feat(libSceNKWebKit): implement Inspector::IdentifiersFactory #16055
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16055"
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-05T13:36:53Z.
What
Implements two
libSceNKWebKitexports fromSource/JavaScriptCore/inspector/IdentifiersFactory.cppat80f77e94c6(the whole file,:34-51). The signatures matchSource/JavaScriptCore/inspector/IdentifiersFactory.h:34-35; nothing else comes from that header, so only the.cppnotice is carried:Inspector::IdentifiersFactory::createIdentifier()(:43-46)Inspector::IdentifiersFactory::requestId(unsigned long)(:48-51)A plain non-atomic
lastUsedIdentifierstarts at 0 andcreateIdentifierpre-increments it, so the first result is0.1and the next0.2;requestId(0)returns a nullStringand any other value returns0.<decimal>without touching the counter. The text comes frommakeString("0."_s, identifier)(:40), an 8-bit string with no padding. The counter stays a plain static, as upstream; no lock or atomic is added. No behaviour differs from the pinned source. Both exports returnWTF::Stringby value through the hidden return pointer, because the existing 8-byteNKWebKit::WtfAbi::Stringowner has a non-trivial destructor.requestIdtakesstd::uint64_t, notunsigned long: the mangledmis a 64-bitunsigned longon the console, whileunsigned longis 32 bits in the MinGW host toolchain. Not compared with a console module.tools/pr_overlap.pylists #13486 under the same exports. That PR is a relinker draft whose merge base predates the 8703 stubs, so its diff re-adds them, all still throwing; it implements neither export. On this head, no open PR adds the same files and no other PR shares an export; the 44 PRs the tool could not merge withmainwere compared separately and none shares an export or a new file, apart from #13486. Line conflicts are the debt count line (docs/dev/debt/libSceNKWebKit.md:39, 18 PRs) and the lines the new debt entry occupies (:14, #16041, and:14-15, #16016). Whichever merges later keeps both sides.Tested
Windows 11 Pro, WinLibs GCC 15.2.0. No title and no console module.
nkwebkit_inspectoridentifiersfactorychecks, in a fixed order because the counter is process-wide:createIdentifierreturns0.1then0.2;requestId(0)returns a nullString;requestId(42)returns0.42andrequestId(1)returns0.1;requestId(18446744073709551615)returns0.18446744073709551615, which fails if the parameter is 32-bit; thencreateIdentifierreturns0.3, sorequestIddid not advance the counter. Every non-null result is checked for length, the 8-bit flag and exact bytes, and both signatures are pinned withstatic_assert.ctest -R nkwebkit: 14 of 14 pass.ctest -R public_headers: 65 of 65 pass.tools/progress.py: 1323 of 11248, two more thanmainatd23df92b38(1321).cmake --build build: exit 0. Whole suite not run.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)