feat(libSceNKWebKit): implement the Inspector backend dispatcher handler constructors #22680
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22680"
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-18T01:55:29Z.
What
Implements 64 11.x exports: the special members of the Inspector
*BackendDispatcherHandlerinterfaces that still throw onmain.C2Ev(21) and deleting destructorsD0Ev(21): Animation, ApplicationCache, Audit, Browser, CSS, Canvas, Console, DOM, DOMDebugger, DOMStorage, Database, Debugger, Heap, Inspector, LayerTree, Network, Page, Runtime, ScriptProfiler, Target and Worker.C2ERKS0_(22): the same domains plus Timeline.The
D1/D2destructors are already empty exports onmain(NoOpExports.cpp).Source: the pinned handler template. Each handler is an interface with one pure virtual method per command and a protected virtual destructor, with no data and no class
operator delete.Details:
TrackPrivateBaseonmain, the vtable is this library's own: offset-to-top 0, no type info, then one__cxa_pure_virtualslot per command, then the complete and deleting destructors.conditionkeys resolved for PlayStation:setEmulatedConditions(network throttling is only enabled inPlatformEnableCocoa.h) are left out;(WEB_ARCHIVE && USE_CF)Page.archivecommand is left out.D0runs the empty destructor and frees through the guest globaloperator delete(_ZdlPv), asBlobDataFileReferencedoes, since the handler declares nooperator delete.Debt: a fragment,
docs/dev/debt/changes/feat-nkwebkit-inspector-dispatcher-handlers.md, adds the entry and removes the 64 inventory rows.Overlap:
pr_overlap.py --namesfinds no open PR with these exports. The dispatchercreate/constructor exports for the same domains stay unimplemented: they need per-command routing.Tested
Linux Mint 22.3. New
nkwebkit_inspectorbackenddispatcherhandlertest, for every domain:__cxa_pure_virtualin every command slot and the two destructors after them;operator new, checked with a tracking guest heap;The full build succeeds, and all 132 NKWebKit tests pass.
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-18T01:57:43Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b3ee56cc57:tools/check_conventions.pypassed.nkwebkit_inspectorbackenddispatcherhandler_testsbuilt cleanly.nkwebkit_inspectorbackenddispatcherhandler):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/InspectorBackendDispatcherHandler.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-18T02:13:56Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the review supports merging, and the checks below were not run.
What I ran
Reviewed head
b3ee56cc57afc8ed05dac14811c53c1d46d302ebusing the prepared diff andrepo_read.pyat the pinned head. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Build and test results reported in the PR description were not independently verified. Reviewed all changed source, header, test, and debt fragment files listed in the manifest;
Export.cppandInventoryExports.hppfull text were excluded from the review folder, so their unchanged context was not read. The relevant diff hunks for these files were inspected. No checks were run on a console.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T22:38:16Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
f5c5b646e66eb2ee16d5b643562055673f3575c7. No build or tests were run; the test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Export.cppandInventoryExports.hppwere excluded as too large. Their relevant diff sections were reviewed, but the remaining contents were not.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T00:07:13Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the implementation and focused tests support its stated scope, though I could not independently run the build or tests.
What I ran
Reviewed head
2f912256e5feaff5ed0cf155a8a6d9f674308a7eand the prepared diff. I read the complete new handler implementation, its new header and test, the changed library include, and relevant diff sections. I did not run commands: the review reader provides read-only source access, not a shell.Results
Findings
Blocking
None found in the source reviewed.
Non-blocking
None.
Not verified
Export.cppandInventoryExports.hppwere excluded from the review folder because they were too large; I did not read them through the reader. The debt fragment was included but not read. I also did not verify the reported Linux Mint build/test results, Windows behavior, target firmware behavior, protocol command counts, or external upstream references. Per the manifest, the changed files reviewed wereInspectorBackendDispatcherHandlerExports.hpp,InspectorBackendDispatcherHandler.cpp,InspectorBackendDispatcherHandler.cpp(test), and the relevant include hunk inlibSceNKWebKit.hpp; not reviewed wereExport.cpp,InventoryExports.hpp, andfeat-nkwebkit-inspector-dispatcher-handlers.md.To get this to a good state
Nothing is required. The author-reported build and test results remain unverified in this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T23:23:07Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix the copy constructor’s null destination handling and rerun the changed test.
What I ran
Reviewed head
47ea345e9dc4ff4eb39c29f1e04d0147d86624dfusing the prepared diff and pinned reader. No commands or tests were run.Results
Findings
Blocking
core/libs/prx/libSceNKWebKit/src/InspectorBackendDispatcherHandler.cpp:85:Copychecksotherbut passesselftoConstructwithout an earlier null check. A copy constructor called with a valid source and null destination reachesself->vptrand dereferences null. The new test expects this case to throw atcore/libs/prx/libSceNKWebKit/tests/InspectorBackendDispatcherHandler.cpp:130, but the unchecked dereference happens first. Validateselfbefore writing through it.Non-blocking
None.
Not verified
Did not run the build or tests.
Export.cppandinclude/InventoryExports.hppwere excluded from the prepared file bundle; reviewed their relevant removals in the supplied diff. Other changed files read:include/InspectorBackendDispatcherHandlerExports.hpp,libSceNKWebKit.hpp,src/InspectorBackendDispatcherHandler.cpp,tests/InspectorBackendDispatcherHandler.cpp, anddocs/dev/debt/changes/feat-nkwebkit-inspector-dispatcher-handlers.md. Both excluded files were reviewed via their diff hunks, not their complete head contents.To get this to a good state
Check the copy constructor destination for null before dereferencing it, then rerun the changed test and the project test suite.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-26T12:49:16Z.
Review: COMMENTED
Actionable comments posted: 2
4a998de9-f203-4ce5-abdc-efda35512ab1Reviewing files that changed from the base of the PR and between
fae9876e97and8c4a88c65f.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/InspectorBackendDispatcherHandlerExports.hppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/libSceNKWebKit.hppcore/libs/prx/libSceNKWebKit/src/InspectorBackendDispatcherHandler.cppcore/libs/prx/libSceNKWebKit/tests/InspectorBackendDispatcherHandler.cppdocs/dev/debt/changes/feat-nkwebkit-inspector-dispatcher-handlers.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T12:55:53Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation and added tests are readable and internally consistent, but I could not run the reported build or tests in this review environment.
What I ran
Reviewed head
8c4a88c65ffcc009af13cafd354df85e48d481d4using the pinnedrepo_read.pyreader tools. No shell commands, build, or tests were run. The author reports a successful full build and 132 passing NKWebKit tests on Linux Mint 22.3.Results
Findings
Blocking
None.
Non-blocking
Nothing is required. The author-reported build and test results would be useful to confirm on this head in CI.
Sources
Reviewed the prepared diff and pinned-head contents of
InspectorBackendDispatcherHandlerExports.hpp,InspectorBackendDispatcherHandler.cpp,InspectorBackendDispatcherHandler.cpp(tests),libSceNKWebKit.hpp,Export.cpp,CMakeLists.txt,VabiMacros.hpp,NoOpExports.hpp, andfeat-nkwebkit-inspector-dispatcher-handlers.md.InventoryExports.hpphas only removals in this change; those were checked in the diff.Export.cppis excluded from the review folder; its relevant removals were checked in the diff. The diff omits lockfiles, minified files,dist/,build/, and SVG files; none appear in the changed-file listing.Not verified
The author-reported build and tests were not rerun. Console behavior and the protocol command counts were not independently confirmed against upstream sources.
To get this to a good state
Nothing is required. Optional: confirm the reported build and NKWebKit test results in CI on this head.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:47Z.
Review: COMMENTED
Built the branch’s changed sources and ran InspectorBackendDispatcherHandler on Linux against the existing runtime libraries. The test run passed and covered the Inspector dispatcher handler construction cases.
AI-assisted: yes.
Pull request closed