feat(libSceNKWebKit): implement WKContext client and invalid message callback controls #24867
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24867"
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 jagrat04 on 2026-11-21T08:10:41Z.
What
Implement WebKit C API
WKContextclient callback registration and invalid message handler inlibSceNKWebKit:WKContextSetClient(NIDs19dG0nY-dE): sets the context client configuration state on the hostProcessPoolinstance following WebKit'sWKContext.cpp.WKContextSetHistoryClient(NIDvoUp4sJ5mfU): sets the history client configuration state on the hostProcessPoolinstance.WKContextSetInvalidMessageFunction(NIDv+TCMUBUWog): registers the invalid message callback function pointer following WebKit'sWKContext.cpp.Tested
tools/check_conventions.py --base origin/mainpassed;tools/debt_fold.py --checkpassed;tests/ContextClients.cpptests setting and resetting context client, setting and resetting history client, registering and resetting invalid message callback, rejecting null context references, and enforcing object type safety. Not tested on a PS5.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 PrivacyOnion on 2026-11-21T08:14:17Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
27e51106f9:tools/check_conventions.pypassed.nkwebkit_contextclients_testsfailed to build.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T08:30:35Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b6ec69b438:tools/check_conventions.pypassed.nkwebkit_contextclients_testsbuilt cleanly.nkwebkit_contextclients):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/Configuration.hpp,core/libs/prx/libSceNKWebKit/src/ContextClients.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-21T08:31:34Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed code adds the three
WKContextcontrols and tests their configuration state; no concrete blocking defect was verified in the files read.What I ran
Inspected the prepared diff and selected source files at head
b6ec69b438042b1e6a18513ca6bb7283d474f53dusingrepo_read.py. No commands or tests were run. The description reports convention and debt checks, but these were not run in this review.Results
Findings
Blocking
None verified in the files read.
Non-blocking
None.
Not verified
Full text was read for
ContextClients.cpp, its test, andConfiguration.hpp; the changed declarations inWebKitValueExports.hppand the prepared diff were reviewed.Export.cppandInventoryExports.hppwere excluded from the review folder because they were too large; their relevant diff hunks were inspected, but their full text and surrounding integration were not reviewed. No build, test suite, or PS5 run was performed. The manifest lists six changed files; four full files were available in the prepared review folder, while two were excluded by size.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T09:30:14Z.
Review: APPROVED
Reviewed — looks good
The implementation and all changed files included for review were inspected at the pinned head; no concrete blocking defect was verified. The claimed convention checks and tests were not run here.
What I ran
Read the prepared diff and changed-file contents at head
89e11d61cee1d0fb769c35ee35e6cef45b0ff687usingrepo_read.py. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Export.cppandinclude/InventoryExports.hppwere excluded from the prepared full-text files because they were too large; their changes are visible in the diff. The PR's reported checks and tests were not executed, and PS5 behavior was not tested.To get this to a good state
Nothing is required.
Files read
description.md,commits.md,manifest.json,diff.patch,include/WebKitValueExports.hpp,src/Configuration.hpp,src/ContextClients.cpp, andtests/ContextClients.cpp. The changed documentation filedocs/dev/debt/changes/wkcontext-client-controls.mdwas present in the manifest but its full text was not read.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T09:34:40Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
89e11d61ce:tools/check_conventions.pypassed.nkwebkit_contextclients_testsbuilt cleanly.nkwebkit_contextclients):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/Configuration.hpp,core/libs/prx/libSceNKWebKit/src/ContextClients.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-22T19:37:42Z.
Review: APPROVED
Reviewed — looks good
The reviewed additions record client registration state and store the invalid-message callback; no verified blocking defect was found in the inspected code.
What I ran
Reviewed head
d781f8b6ac175ce8ce1dd4d18bc6b4c48352ae42. I read the prepared description, commits, manifest, and diff, plus the changed source and test files and relevant CMake/context. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwas excluded because the files were too large for the review folder; their changed hunks were inspected indiff.patch. Build, automated checks, and PS5 behavior were not independently verified. Files read:description.md,commits.md,manifest.json,diff.patch,review/README.md,core/libs/prx/libSceNKWebKit/src/Configuration.hpp,core/libs/prx/libSceNKWebKit/src/ContextClients.cpp,core/libs/prx/libSceNKWebKit/tests/ContextClients.cpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/CMakeLists.txt, andcore/libs/prx/libSceNKWebKit/src/Connection.cpp. Files reviewed per manifest: 7; changed lines in 5 of those were read from the prepared artifacts, and 2 excluded files' changed hunks were read from the diff.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T04:25:42Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review, but the client setters retain only whether a client was supplied, so optional points below are worth addressing before relying on these callbacks.
What I ran
Reviewed head
6e47b1b921c4e3987a7aeac9d39d4cceac8a413a. I inspected the prepared diff and targeted source searches; I did not run tests or prechecks. The reader was unavailable as a command, so repository files were read through the provided reader tool.Results
Findings
Blocking
None.
Non-blocking
WKContextSetClientandWKContextSetHistoryClientonly toggle boolean flags based on whetherclientis null. They do not retain the client structure or its callbacks, so this implements registration state but cannot invoke the registered callbacks. If callback invocation is outside this PR’s scope, clarify that in the description. Changed lines:core/libs/prx/libSceNKWebKit/src/ContextClients.cpp:118,core/libs/prx/libSceNKWebKit/src/ContextClients.cpp:123.core/libs/prx/libSceNKWebKit/src/ContextClients.cpp:100.Not verified
Export.cppandInventoryExports.hppfull text were excluded as too large; their relevant removals are visible in the prepared diff, but their full contents were not read.files.jsonwas unavailable through the reader, so the excluded-file inventory could not be confirmed beyond the manifest.WebKitValueExports.hpp,Configuration.hpp,ContextClients.cpp,ContextClients.cpptest, and the debt change record. Also inspectedCMakeLists.txtfor test discovery.To get this to a good state
Nothing is required. Optional: clarify whether storing only client-present state and using one global invalid-message callback are intentional.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T12:22:58Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation matches the documented limited behavior;
Export.cppwas excluded from the review folder, so the review is incomplete.What I ran
Reviewed head
dd6ac454c27ad12d7eb26f31ca49de2b10bf0af8usingrepo_read.pyreader tools. No commands or tests were run. The description reports convention and debt checks and a context-client test, but those results were not independently verified.Results
Export.cppwas excludedFindings
Blocking
None in the files read.
Non-blocking
None.
Sources
Behavior claims were checked against the changed implementation and its technical-debt entry at head
dd6ac454c27ad12d7eb26f31ca49de2b10bf0af8.Not verified
core/libs/prx/libSceNKWebKit/Export.cppwas excluded because it was too large for the review folder. Tests, convention checks, and debt checks were not run. No PS5 behavior was verified. The other six changed files were read:InventoryExports.hpp,WebKitValueExports.hpp,Configuration.hpp,ContextClients.cpp,tests/ContextClients.cpp, andwkcontext-client-controls.md.To get this to a good state
Nothing is required. Optional: inspect the excluded
Export.cppbefore making a formal approval decision.Pull request closed