feat(libSceNKWebKit): implement 38 exports whose WebKit body returns a constant #23468
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23468"
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 RiverWhy on 2026-11-19T03:49:54Z.
What
Implements 38
libSceNKWebKitexports whose WebKit body returns a constant. All 38 throwNotImplementedonmaintoday.Source: WebKit
e12a212a531a(May 2021). Its signatures match these exports' mangled names (FrameLoaderClient,EmptyFrameLoaderClient::createFrame(const String&, …)), where the PS5-WebKit-11.x source has since renamed them (LocalFrameLoaderClient,AtomString). For the PlayStation build,PlatformPlayStation.cmakeincludesplatform/Curl.cmakeand buildsplatform/libwpe/PasteboardLibWPE.cppandPlatformPasteboardLibWPE.cpp. The sharedSources.txtbuildsplatform/SSLKeyGenerator.cppandplatform/graphics/Icon.cpp, whose#ifguards include PlayStation.FrameLoaderClient,EmptyFrameLoaderClient,LoaderStrategy,RemoteInspector::ClientandRemoteInspectionTargetdefaults{ return false; },{ return true; },{ return { }; },{ return String(); },return nullptr;ModuleConstantBodies.cppPasteboard/PlatformPasteboard, curlResourceResponse::cfURLResponse,SSLKeyGenerator,Icon, non-CocoaCredentialStorage,SocketProvider,InspectorFrontendClientLocal::SettingsnotImplemented(); return { };orreturn { };/return nullptr;ModuleConstantBodies.cppASSERT_NOT_REACHED(); return { };(WKBundleNodeHandle.cpp)ModuleConstantBodies.cppCachedResourceHandleBase()andInspector::PerGlobalObjectWrapperWorld(), C1 and C2: m_resource(nullptr), and the implicit constructor of a singleHashMapmember (HashTable()is: m_table(nullptr))ModuleConstantBodies.cppFrameLoaderClientplacementoperator newandoperator new[]WTF_MAKE_FAST_ALLOCATED:{ return p; }ArgumentReturn.cppThe sources table in a comment on this PR gives the file and line of every one of the 38. Values returned through the return slot (a null
String/RefPtr/HashSet, an emptyVector, a zeroWKRect) are written as that many zero bytes. A null return-slot or object pointer throwsinvalid_argument, like the other NKWebKit exports.The rest of what this PR first contained is now on
main. #23753 implements the 112 exports with an empty body, andSessionCookies.cppimplementsNetworkStorageSession::getCookieswith a real cookie store. Because of that store,NetworkStorageSession::domCookiesForHostis left out too: an always-empty answer would contradictsetCookies.Debt: the fragment
docs/dev/debt/changes/feat-nkwebkit-module-constant-bodies.mdadds one Functional entry and removes the 17 inventory rows that exist for these names.Overlap: no other open PR removes these stubs. The merge with
maindropped this branch's copies of the exportsmainnow has.Tested
Linux Mint 22.3, GCC 13.3, Release:
nkwebkit_moduleconstantbodiescalls all 38 exports. It checks each return value, checks that exactly 8/16/32 bytes of a 0xa5-filled buffer are cleared and the rest untouched, checks that a null pointer throws, and checks that noNotImplementedcall happened. It passes.falsefromFrameLoaderClient::shouldPaintBrokenImagemakes it fail.g++ -std=c++20 -fsyntax-only(WinLibs MinGW) on the changed.cppfiles.tools/check_conventions.pypasses;core/libs/tests/test_public_headers.py --audit-onlypasses.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T03:59:45Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d537c7a8d4:tools/check_conventions.pypassed.nkwebkit_moduleconstantbodies_tests,nkwebkit_noops_testsbuilt cleanly.nkwebkit_moduleconstantbodies,nkwebkit_noops):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/Api.hpp,core/libs/prx/libSceNKWebKit/include/ArgumentReturnExports.hpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ArgumentReturn.cpp,core/libs/prx/libSceNKWebKit/src/NoOpExports.cpp,core/libs/prx/libSceNKWebKit/src/ModuleConstantBodies.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T23:21:10Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the return-slot writes and zero-argument no-op additions are consistent with the inspected implementation and test code.
What I ran
Reviewed head
6602845df2a5b07a45018d25c42f08eb9fd9f95ausingrepo_read.pyagainst the prepared diff and repository files. No commands or tests were run by me; test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read
Api.hpp,ArgumentReturnExports.hpp,LegacyExports.hpp,ModuleConstantBodyExports.hpp,NoOpExports.hpp,libSceNKWebKit.hpp,ArgumentReturn.cpp,ModuleConstantBodies.cpp,NoOpExports.cpp,ModuleConstantBodies.cpp(tests),NoOps.cpp, and the debt change note. I also read the relevantCMakeLists.txtcontext andExport.cppcontext.Export.cppandInventoryExports.hppare changed files excluded from the prepared review bundle; only targeted excerpts/search results were inspected, not their full text. The PR’s reported Linux test runs and negative control were not independently verified. No commit-pinned permalinks were available through the reader.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T18:02:43Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes at head
d01d1218a68ac58f8461a6821c0e6bf1c8216624consistently replace the selected stubs with the described constant returns; I found no verified blocker.What I ran
Inspected the prepared diff and review metadata, then used
repo_read.pyfor targeted source reads at the pinned head. I ran no build or tests.Results
Negative control
Not run by reviewer. The description reports that changing
shouldPaintBrokenImageto return false makes its test fail; I did not independently verify that result.Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
I reviewed all 11 changed paths through the prepared diff and targeted context. Ten full texts were available in
files/;Export.cppwas too large for the review folder, so I inspected its changed hunks indiff.patch. The author-reported Linux tests, Windows syntax checks, and convention/header audits were not run by me. Console behavior was not tested.To get this to a good state
Nothing required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T18:09:39Z.
Review: COMMENTED
Actionable comments posted: 1
Architecture findings (1)
Advisory architecture findings (1)
0adf1948-10f7-42f8-aeed-7d56b3156b67Reviewing files that changed from the base of the PR and between
eb100e6121andd01d1218a6.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/Api.hppcore/libs/prx/libSceNKWebKit/include/ArgumentReturnExports.hppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/include/LegacyExports.hppcore/libs/prx/libSceNKWebKit/include/ModuleConstantBodyExports.hppcore/libs/prx/libSceNKWebKit/libSceNKWebKit.hppcore/libs/prx/libSceNKWebKit/src/ArgumentReturn.cppcore/libs/prx/libSceNKWebKit/src/ModuleConstantBodies.cppcore/libs/prx/libSceNKWebKit/tests/ModuleConstantBodies.cppdocs/dev/debt/changes/feat-nkwebkit-module-constant-bodies.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:20Z.
Review: COMMENTED
Built the branch’s changed sources and ran ModuleConstantBodies on Linux against the existing runtime libraries. The test run passed and covered the WebKit exports that return the measured constants.
AI-assisted: yes.
Pull request closed