feat(libSceNKWebKit): implement WebCore::ProtectionSpaceBase predicates #16066
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16066"
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 gslashm on 2026-11-05T14:14:19Z.
What
Implements three
WebCore::ProtectionSpaceBasepredicates forlibSceNKWebKit:WebCore::ProtectionSpaceBase::isProxy(_ZNK7WebCore19ProtectionSpaceBase7isProxyEv, NIDtHkyOSFwdIc), fromSource/WebCore/platform/network/ProtectionSpaceBase.cpp:43-49.WebCore::ProtectionSpaceBase::receivesCredentialSecurely(_ZNK7WebCore19ProtectionSpaceBase26receivesCredentialSecurelyEv, NIDr5QyX8BvB2c), fromProtectionSpaceBase.cpp:51-57.WebCore::ProtectionSpaceBase::isPasswordBased(_ZNK7WebCore19ProtectionSpaceBase15isPasswordBasedEv, NID14QqltFJ+xk), fromProtectionSpaceBase.cpp:59-80.Paths and lines are at
80f77e94c63ee7202eec3d4b5b1a021dd89011ba.ABI:
ProtectionSpaceBasehas no virtual functions (ProtectionSpaceBase.h:35), sothisis the object.src/WebCoreTypes.hpppins the layout fromProtectionSpaceBase.h:92-98withstatic_asserts:m_hostat 0,m_realmat 8,m_portat 16,m_serverTypeat 20,m_authenticationSchemeat 21,m_isHashTableDeletedValueat 22, size 24. Both enums have auint8_tunderlying type (ProtectionSpaceBase.h:37-62) and are read asstd::uint8_t, so a byte outside the enum is not undefined behaviour. Each predicate returnsbool.Behaviour that differs from upstream, and why:
selfthrowsstd::invalid_argumentinstead of dereferencing null.isPasswordBasedhas noAuthenticationScheme::ClientCertificatePINRequestedcase (value 10). This matches what upstream compiles on PlayStation: the enumerator exists only underUSE(GLIB)(ProtectionSpaceBase.h:58-60), andUSE_GLIBis defined only for GTK and WPE (Source/WTF/wtf/PlatformUse.h:69-70). A byte of 10 returns true through the trailingreturn trueatProtectionSpaceBase.cpp:79.ProtectionSpaceBase::compare(ProtectionSpaceBase.cpp:82-97) remains a throwing stub. On PlayStationUSE_CURLis on (Source/cmake/OptionsPlayStation.cmake:325), soplatformComparecomparesm_certificateInfo(curl/ProtectionSpaceCurl.h), and the size and layout of the PS5CertificateInfoare unknown, as the debt file already records forResourceResponseBase. A partialcomparewould answer true for fields it never compared.The two upstream notices (
.cppand.h) are kept byte for byte in the new file, including the trailing space on line 23 of each, sogit diff --checkreports those two lines.Not compared with a console module.
tools/pr_overlap.pylists #13486 under the same exports. That PR is a relinker draft whose head is unchanged at0bde10d243and whose merge base predates the 8703 stubs, so its diff re-adds all three asNotImplemented_nid_no_patchstubs; it implements none of them. No open PR adds the same files. The 44 PRs the tool could not merge withmainwere compared separately: none defines one of the three names, and only #15151 adds aProtectionSpacefile,src/ProtectionSpace.cppandsrc/ProtectionSpace.hppfor theWKProtectionSpace*C API, which shares no export with this PR. Line conflicts are the debt count line (docs/dev/debt/libSceNKWebKit.md:39, 18 PRs), the lines the new debt entry occupies (:14with #16041 and #16055,:14-15with #16016), and the neighbouring stubs (Export.cpp:39037-39052,InventoryExports.hpp:6764-6767and the deleted table rows:6679-6682) with #15214. #15125 and #15213 also editsrc/WebCoreTypes.hpp; whichever merges later keeps both sides.Tested
Windows 11 Pro, WinLibs GCC 15.2.0. No title and no console module.
tests/WebCoreProtectionSpaceBase.cpp(nkwebkit_webcoreprotectionspacebase) pins the three signatures withstatic_assert, then checks: the two enum bytes at offsets 20 and 21 in a rawalignas(8) unsigned char[24];isProxyfor server types 1-8 plus 0, 9 and 255;receivesCredentialSecurelywith HTTP basic for types 1-8 and with digest for every type;isPasswordBasedfor every scheme byte 0-255, false only at 7, 8 and 100; that host, realm, port and the deleted-value flag never change a result; and that a nullselfthrows for all three.ctest -R nkwebkit: 14 of 14 pass (13 onmain; this test is new).ctest -R public_headers: 65 of 65 pass.python tools/progress.py --module libSceNKWebKit:1324/11248, 3 more thanmain's 1321.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-16T14:26:57Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation follows the described predicates and repository source wiring includes the new implementation file.
What I ran
Reviewed head
29f9577320ad58005ae606002998f134b2ffd729. No commands or tests were run;repo_read.pywas used to inspect the prepared diff and targeted source context. The PR description reports Windows 11 and GCC test runs, which I did not independently run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No programmatic checks were run, and console behavior was not compared. Reviewed files:
WebCoreExports.hpp,WebCoreProtectionSpaceBase.cpp,WebCoreTypes.hpp,tests/WebCoreProtectionSpaceBase.cpp,CMakeLists.txt,Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdchanged hunks. The completeExport.cpp,InventoryExports.hpp, and debt document were excluded from the prepared review files; only targeted ranges or diff hunks were inspected. The other files infiles.jsonwere not read in full.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T22:30:34Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
b0f829e0e537829e0ed4e974e6f193afa9e3a515usingrepo_read.pyfor the prepared diff and targeted repository source. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
Derived fromlines before those notices (WebCoreProtectionSpaceBase.cpp:1,WebCoreProtectionSpaceBase.cpp:27). The notices themselves appear intact; adjust the description if byte-for-byte preservation includes the surrounding lines.Not verified
description.md,commits.md,manifest.json,diff.patch; changed sourceWebCoreProtectionSpaceBase.cpp,WebCoreTypes.hpp,WebCoreExports.hpp, and testWebCoreProtectionSpaceBase.cpp; contextCMakeLists.txt,LegacyProtectionSpaceBaseAbi.hpp,LegacyProtectionSpaceBase.cpp, andCMakeLists.txtat repository root. Excluded from full-text reading because too large:Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.md.files.jsonwas not available through the reader.To get this to a good state
Nothing is required. Optionally, align the description’s byte-for-byte statement with the added provenance lines.