feat(libSceNKWebKit): implement WTF::protocolHostAndPortAreEqual #14303
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14303"
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 voidlakhan on 2026-11-01T09:00:58Z.
What
Implements
WTF::protocolHostAndPortAreEqual(const WTF::URL&, const WTF::URL&)inlibSceNKWebKit(NIDtDDzvLlQ7CE, mangled_ZN3WTF27protocolHostAndPortAreEqualERKNS_3URLES2_), replacing the throwing stub with verified upstream WebKit semantics.neonmodder123/PS5-WebKit-11.x(protocolHostAndPortAreEqual) andURL::port()at pinned commit80f77e94c63ee7202eec3d4b5b1a021dd89011ba.libSceNKWebKit.sprxwith NIDtDDzvLlQ7CE. Added typed prototype ininclude/WtfExports.hpptaking(const NKWebKit::WtfAbi::URL*, const NKWebKit::WtfAbi::URL*)and returningbool.Checked(), throwing on null pointers per repository convention.schemeEndfrom bitfieldbits >> 6) and performs case-insensitive ASCII comparison of scheme substrings ([0, schemeEnd)).hostEnd - hostStart) and performs case-insensitive ASCII comparison of host substrings ([hostStart, hostEnd)), correctly usingHostStart()((passwordEnd == userStart) ? passwordEnd : passwordEnd + 1).URLPort()helper extractingm_portLength((bits >> 3) & 7) and parsing 16-bit decimal port numbers from[hostEnd + 1, portLength - 1)polymorphically over 8-bit Latin-1 and 16-bit UTF-16 string views.a.port() == b.port()semantics where absent ports (std::nullopt) compare equal to each other, an explicit default port (e.g.:80) compares unequal to an absent port, and empty, non-digit, or out-of-range (> 65535) ports evaluate tostd::nullopt.include/InventoryExports.hpp, removed throwing stub fromExport.cpp, and decremented unresolved inventory count from 7573 to 7572 indocs/dev/debt/libSceNKWebKit.md.Tested
tests/nkwebkit_wtf_tests.exe: 1/1 test passed (nkwebkit_wtfpassed, 100% pass rate).HTTPS:vshttps:).EXAMPLE.TESTvsexample.test).:8443vs:9443).http://example.test:80vshttp://example.testcompares unequal).http://example.test/pathvshttp://example.test/othercompares equal).:0), max uint16_t port (:65535), empty synthetic port (:), malformed non-digit port (:8x), and out-of-range port (:70000).python tools/check_conventions.py --base upstream/main: passed locally.git diff --check upstream/main..HEAD: clean diff (no whitespace or conflict markers).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 MarcZX10 on 2026-11-01T09:17:36Z.
Review: APPROVED
Reviewed — looks good
I found no blocking issue in the implementation: it follows the pinned WebKit comparison and port-parsing semantics, and the hosted Windows job passes.
What I ran
Reviewed head
c1577a68c78852b2ac93b03f0b06ae53d13629f2against PR base1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba; an independent merge preview against currentmain26fa1212b82f76dd49cf12d65e445d6ff3e0844cwas clean. Environment: Debian GNU/Linux 12, Python 3.11.2, Git 2.39.5, GCC 12.2.0. No local C++ build or CTest was run; Windows CI compiled and tested this head.Results
main.Raw selected check output
Negative control
Findings
Blocking
None.
Non-blocking
The Linux and specialized hosted jobs were skipped, and console behavior was not verified. The author reports a passing Windows test executable in the PR description; I did not rerun it locally.
Sources
Not verified
I did not run a local C++ build, CTest, Linux build, specialized CI job, or console test. The author's Windows test result is reported in the PR body and was not independently reproduced here.
To get this to a good state
No changes are required for the reviewed head. If the head changes, I will rerun the same checks against the new head.