feat(libSceNKWebKit): implement WKContextSetDomainRelaxationForbiddenForURLScheme #18357
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18357"
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 heditrigui on 2026-11-11T11:47:52Z.
What
This pull request implements \WKContextSetDomainRelaxationForbiddenForURLScheme\ in \libSceNKWebKit:
const void* contextRef, const void* urlSchemeRef).Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T15:56:11Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
cbe0d71272:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_base_testsbuilt cleanly.nkwebkit_base):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/Context.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-12T15:07:17Z.
Review: COMMENTED
Reviewed WKContext URL scheme exports — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
002c91d50a5f7d72dda7f1f754c8b64082ffa1f7, basemain. No merged-preview check and no build.repo_read.py: theCasthelper and its null handling, theStringtype, theextern "C"block ofWebKitValueExports.hpp, theProcessPoolConfigurationheader, and the test file's includes.Results
TestContextFindings
Blocking
None.
Non-blocking
core/libs/prx/libSceNKWebKit/tests/Base.cpp:2198-2199and2219-2220: the description says the dedupe and the add/remove toggle are verified, but the test never reads the scheme state back. Removing thepush_backor theerasewould still pass.core/libs/prx/libSceNKWebKit/tests/Base.cpp:2234-2238and2242: both throw checks passnullptrfor the context and the scheme, so the context check throws first. A null scheme with a valid context is never exercised, although the description lists null string arguments.core/libs/prx/libSceNKWebKit/src/Context.cpp:41,50,59,68and77: the same find-then-push block appears five times. A small helper would remove the repetition.Not verified
core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp:353: whetherWKContextSetDomainRelaxationForbiddenForURLSchemetakes aboolupstream. The debt doc links the upstreamWKContext.cpp, which I did not open. If the upstream call has two arguments, a guest call would leaveforbiddenwith an undefined value.docs/dev/debt/libSceNKWebKit.mdstill agree after the six stubs were removed fromExport.cppandInventoryExports.hpp. The author's headers audit was not re-run.Configuration.hpp. The diff only writes them, and I did not search the whole tree for readers.Export.cpp,InventoryExports.hppanddocs/dev/debt/libSceNKWebKit.mdare too large for the folder, so their changes were read fromdiff.patchonly. The other four (WebKitValueExports.hpp,Configuration.hpp,Context.cpp,tests/Base.cpp) were read from their diff hunks plus the head context above.To get this to a good state
Nothing is required.
Optional: confirm the upstream
boolsignature (see Not verified).Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T01:49:49Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make the new registrations update the scheme state consumed by WebKit.
What I ran
Reviewed head
71846788bbe21b6c889f207adaaca20727125176using the prepared diff and the pinnedrepo_read.pysource reader. No tests or build commands were run.Results
Findings
Blocking
core/libs/prx/libSceNKWebKit/src/Context.cpp:41: The new API stores schemes in fields on eachProcessPool, but the scheme predicates inMime.cppconsult separate global vectors (g_emptyDocSchemes,g_secureSchemes, and others), populated throughAddScheme. Nothing in the reviewed code transfers these new per-pool registrations to those vectors. As a result, calling the new exports does not change the scheme behavior they claim to register. Wire the handlers to the state their consumers read, or update those consumers to consult the registered process pool state.Non-blocking
None.
Not verified
The full text of
Export.cpp,include/InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwas excluded by the review bundle size rule; their relevant hunks were inspected indiff.patch. The new handlers, their state declarations, API declarations, tests, CMake test discovery, and scheme consumer state inMime.cppwere read. No build or test execution was performed.To get this to a good state
Connect each registration handler to the scheme state used by WebKit's scheme predicates, then run the targeted NKWebKit tests and relevant build checks.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T02:46:55Z.
Review: APPROVED
Reviewed — looks good
The URL scheme exports record deduplicated scheme names on each process pool; I reviewed the changed implementations and focused tests at head
353a5d6057b8f2bb6c115c2bc1cb4230c8f5080a.What I ran
No build or tests were run. I read the prepared description, commits, manifest, and diff, plus the included changed files
Context.cpp,Configuration.hpp,WebKitValueExports.hpp, andtests/ContextUrlSchemes.cpp. The excluded files areExport.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.md; their diff hunks were reviewed, but their full text was not read.files.jsonwas not available through the reader. Repository context read:Types.hpp,Mime.cpp, andCMakeLists.txt.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The build, tests, behavior on a physical console, and the complete contents of excluded files were not verified. The PR description reports tests and audits as passed; those are author-reported, not runs performed in this review.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T18:09:27Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: route the new registration into the registry used by WebCore, or document and implement the intended host ProcessPool-only semantics consistently.
What I ran
Reviewed head
8a61899151102ceee569d0e33de354a98439ec0f; no merged-preview check was run. I read the prepared description, commits, manifest, diff, and the full text of the included changed source, header, and test files. I inspected targeted code inMime.cppand the excludedExport.cppandInventoryExports.hppthroughrepo_read.py. No tests or build commands were run.Results
Findings
Blocking
WKContextSetDomainRelaxationForbiddenForURLSchemeadds the scheme only toProcessPool::domainRelaxationForbiddenSchemes; the existing WebCore registry maintains a separateg_domainRelaxationForbiddenSchemeslist, and its setter updates that list. Nothing in the code inspected connects the ProcessPool vector to that registry. Consequently, this API call does not affect the behavior governed by WebCore's registry. Route the new API to that registry (with the required context and synchronization semantics) or provide a demonstrated consumer for the ProcessPool field. Evidence:core/libs/prx/libSceNKWebKit/src/ContextURLSchemes.cpp:45.Non-blocking
None.
Not verified
No test, build, conventions, or public-header audit was run. The full text of
Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwas excluded from the review folder; targeted export and inventory paths were inspected through the reader, but the documentation file was not read. Other behavior outside the targeted code was not verified.To get this to a good state
Connect this API to the registry that controls WebCore domain-relaxation behavior, then run the relevant tests and checks on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T18:39:30Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the targeted code inspected is consistent with the stated implementation, and the review remains incomplete because three changed files were not read in full.
What I ran
Reviewed head
e1b0abf7e5a16c18231b042d7ce1d5f0afec2bf7usingrepo_read.pyto read the prepared diff, manifest, included files, and targeted repository context. No build or tests were run.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Not verified
Read in full:
core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/Configuration.hpp,core/libs/prx/libSceNKWebKit/src/ContextURLSchemes.cpp, andcore/libs/prx/libSceNKWebKit/tests/ContextURLSchemes.cpp.Read only targeted ranges:
core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, andcore/libs/prx/libSceNKWebKit/src/Mime.cpp. The changed documentation filedocs/dev/debt/libSceNKWebKit.mdwas not read from the repository. No build, unit tests, convention check, public headers audit, or console behavior was verified. The description reports these checks passed, but they were not run in this review.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T07:19:27Z.
Review: COMMENTED
Reviewed — comments
The implementation records the scheme and forwards it to WebCore, but its null-string test does not cover an empty non-null string and the registry call receives a null string for the tested null input.
What I ran
Reviewed head
78e7106ddaf8c54be667601ffa0773b21d3e6630. No commands or tests were run. Read the prepared description, commits, manifest, and diff; read the full included source forWebKitValueExports.hpp,Configuration.hpp,ContextURLSchemes.cpp, andtests/ContextURLSchemes.cpp, plus targeted reader search results for the referenced WebCore and WTF symbols.Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwere excluded from full-text review because they exceeded the review-folder limit.Results
Findings
Blocking
None.
Non-blocking
ContextURLSchemes.cpp:50tests onlyscheme->null, while the null-string test then calls WebCore's registry withwtfScheme.impl == nullptr(ContextURLSchemes.cpp:55). The test does not assert that null is a supported input or that it is harmless. Consider returning after validation for a null string, or reject it, and test the chosen behavior. The PR description reports null-string error handling, but the test currently invokes the API with a null string without expecting an exception.Not verified
The full text of
Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwas not read. Tests, convention checks, public header audit, build, and console behavior were not run. The test claims in the description are author-reported, not independently confirmed. No other files were marked as excluded in the manifest.To get this to a good state
Nothing is required. Optional: clarify and test the intended null-string behavior before forwarding it to WebCore.
Pull request closed