feat(libSceNKWebKit): implement WebCore::parseRange #18175
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18175"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by opxdelwin on 2026-11-10T18:20:01Z.
What
Implements
WebCore::parseRange(const String&, long long& rangeOffset, long long& rangeEnd, long long& rangeSuffixLength)(_ZN7WebCore10parseRangeERKN3WTF6StringERxS4_S4_) in libSceNKWebKit, removing its throwing stub. The declaration moves fromLegacyExports.hpptoWebCoreParsersExports.hpp; null pointers throwstd::invalid_argument.The export is in the older 3.20 inventory only. The pinned PS5 11.x source has just the later
parseRange(StringView, RangeAllowWhitespace, long long&, long long&), a different symbol, so this follows the mid-2019 upstream WebKit HTTPParsers.cpp with itsstripWhiteSpaceandtoInt64Strictsemantics. Source-only: the console binary is not checked, and the debt entry says so.Behaviour kept as in that source, each covered by a test: a
-suffix that is not an integer (bytes=-,bytes=-5,7) returns true with all outputs -1; there is no explicit comma check, a range list fails only because the last position is not an integer; the prefix test is(unit | 0x20), so U+001D matches=; whitespace is ASCII 0x09-0x0D and 0x20, and above 0xFF the BidiWhite_Space_Neutralcode points.Tested
Ubuntu 24.04, GCC 13.3.0, Release, this branch merged into
mainat3e63c9f68f, onlynkwebkit_webcoreparsers_testsand its dependencies built:ctest -R nkwebkit_webcoreparsers -V: passed, 0.02 s.ctest -R public_headers: 65 of 65 passed.Windows 11, MSYS2 UCRT64 GCC 16.2.0 (SEH), full build of
nkwebkit_webcoreparsers_tests:ctest -R nkwebkit_webcoreparsers -V: passed, 0.10 s. The new cases cover each accepted form, the case-insensitive prefix, whitespace, 63-bit overflow andLLONG_MIN, multi-range rejection,start > end, empty and null strings, null arguments, and 8-bit and 16-bit strings, with exhaustive 16-bit sweeps over the whitespace and prefix code units.ctest -R public_headers: 65 of 65 passed.python3 tools/check_conventions.py --base upstream/main: passed.-DCMAKE_SKIP_INSTALL_RULES=ONon this toolchain because3rdparty/libxml2'sinstall(EXPORT)fails withwindows_seh_personalitiesnot in any export set; that is unrelated to this change.pr_overlap.pylists other NKWebKit PRs that editExport.cppand the debt file; none implementsparseRange. #16853, #17540, #17695 and #17835 also touchWebCoreParsersExports.hpporLegacyExports.hppfor different exports.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-10T21:13:54Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
753ad44f7d:tools/check_conventions.pypassed;git diff --checkclean.libSceNKWebKit,nkwebkit_webcoreparsers_testsbuilt cleanly.nkwebkit_webcoreparsers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/WebCoreParsersExports.hpp,core/libs/prx/libSceNKWebKit/src/WebCoreParsers.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me