feat(libSceNKWebKit): implement WKRegistrableDomainCreate #24873
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24873"
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:37:37Z.
What
Implement WebKit PlayStation C API
WKRegistrableDomainCreateinlibSceNKWebKit:WKRegistrableDomainCreate(NIDBjwTHxBa4gc): extracts the host from aWKURLand resolves the registrable domain usingWebCore::topPrivatelyControlledDomain/ public suffix list following upstreamWKRegistrableDomainPlayStation.cppandRegistrableDomain.h. Returns"nullOrigin"for URLs without a host (such asabout:blankorfile:URLs).Tested
tools/check_conventions.py --base origin/mainpassed;tools/debt_fold.py --checkpassed;tests/RegistrableDomain.cpptests resolving domain names across standard domains, multi-part public suffixes (.co.uk), IPv4 addresses, localhost,about:blank,file:, uppercase URLs, enforcingWKStringGetTypeIDreturn type, rejecting null URLs, and validating object type constraints withRequireInvalidArgument. 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)Summary by CodeRabbit
example.comforshop.example.com.nullOrigin; when no registrable domain is available, the host is returned instead.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T08:40:31Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d2d28b05b5:tools/check_conventions.pypassed.nkwebkit_registrabledomain_testsbuilt cleanly.nkwebkit_registrabledomain):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T09:21:00Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e284649314:tools/check_conventions.pypassed.nkwebkit_registrabledomain_testsbuilt cleanly.nkwebkit_registrabledomain):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/URL.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-21T09:21:25Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: pass the URL host to WebCore as a valid WTF string before resolving its registrable domain.
What I ran
Reviewed head
e28464931446ecb87027359fe26d1781f2d0a937. I inspected the prepared diff and targeted source using therepo_read.pyreader; I did not run tests or other commands.Results
Findings
Blocking
core/libs/prx/libSceNKWebKit/src/URL.cpp:315:hostis a UTF-8 byte sequence, but it is passed to WTF's 8-bitStringImpl::createwith the byte count. That constructor treats bytes as Latin-1, so internationalized hostnames are passed totopPrivatelyControlledDomainas different text; the returned domain can therefore be wrong. Decode the host to the representation expected by the WebCore API before calling it, and cover an internationalized hostname.Non-blocking
None.
Sources
Not verified
core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/URL.cpp,core/libs/prx/libSceNKWebKit/src/Types.hpp,core/libs/prx/libSceNKWebKit/include/PublicSuffixExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp, and the prepared description, commits, manifest, and diff.core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppfull texts. Their diff hunks were read.review/files.jsonwas unavailable.To get this to a good state
Convert the extracted host to the correct WTF string representation before resolving the domain, then run the added registrable-domain test including an internationalized hostname.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T09:37:06Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e4d2d272a4:tools/check_conventions.pypassed.nkwebkit_registrabledomain_testsbuilt cleanly.nkwebkit_registrabledomain):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/URL.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-21T09:48:37Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed implementation and tests support merging.
What I ran
Reviewed head
e4d2d272a40f96131314d2780b15dd62e57c50ae. Read the prepared diff and changed code; no commands or tests were run. The PR description reports convention and debt checks passed and notes no PS5 testing; these were not run by this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
Export.cppandInventoryExports.hppwas excluded from the review bundle and not read through the repository reader. Their relevant diff hunks were reviewed. Automated checks and PS5 behavior were not verified. Other than those exclusions, all changed files were read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T19:27:40Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation appears sound from the source inspected at head
e96b990e62121c07a939fb8f9a7b8dfa12bc5a4d; no checks were run during this review, so approval is not justified.What I ran
No commands or tests were run. I inspected the prepared diff and relevant source using the review reader.
Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/include/InventoryExports.hppand unchanged portions ofcore/libs/prx/libSceNKWebKit/Export.cppwere not read; both were excluded from the review folder as too large. Directory listing confirmed the file paths.core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/URL.cpp,core/libs/prx/libSceNKWebKit/tests/RegistrableDomain.cpp, anddocs/dev/debt/changes/wkregistrabledomain-create.md(the last file was present in the manifest but its full text was not separately read). Changed files reviewed: these four pluscore/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppvia the diff.To get this to a good state
Nothing is required. Optional: run the reported checks and test on this head, and confirm the PS5 behavior.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T00:16:13Z.
Review: COMMENTED
Reviewed — comments
Changes are needed to resolve one compatibility concern before this review can support a formal decision; the modified legacy export declaration was removed while the implementation is now declared in a different header.
What I ran
Reviewed head
4f72fad6ecc748c0d3d80a4b7874830974d244d6using the prepared diff andrepo_read.py. No commands, tests, or prechecks were run. The PR description reports convention and debt checks as passed and says it was not tested on a PS5; these were not independently verified.Results
Findings
Blocking
None verified.
Non-blocking
core/libs/prx/libSceNKWebKit/include/InventoryExports.hppremoves theWKRegistrableDomainCreatedeclaration, while the replacement declaration is added toWebKitValueExports.hpp(core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp:492). The function implementation is inURL.cpp. Since the large generated export and dispatch files could not be reviewed in full, I could not confirm whether the declaration move is correct for consumers of the inventory header. Please confirm the intended header/API ownership and retain or update the declaration there if that header remains part of the public export surface.Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwas excluded as too large; only the nearby export implementation range and the beginning of the inventory header were read.review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNKWebKit/src/URL.cpp,core/libs/prx/libSceNKWebKit/tests/RegistrableDomain.cpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp(relevant declaration range),core/libs/prx/libSceNKWebKit/include/PublicSuffixExports.hpp,core/libs/prx/libSceNKWebKit/src/Types.hpp(relevant definitions),core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp(relevant definitions), anddocs/dev/debt/changes/wkregistrabledomain-create.md.Export.cppandInventoryExports.hpp.review/files.jsonwas not available from the reader.To get this to a good state
Nothing is required for merge based on a verified defect. Optional: confirm the export declaration’s intended header ownership and test the changed behavior on the supported build target.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T12:20:07Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; I found no verified defect in the implementation, and the available evidence supports merging.
What I ran
Reviewed head
5fd563f30baaeb1848594b015868b514eefd019a. I read the prepared description, commits, manifest, and diff, plus the full text of each included changed file and targeted source ranges for the suffix lookup and string conversion. I used the repository reader search and read tools; no tests or builds were run. The description reports convention and debt checks as passed, but I did not run them.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review bundle because it is too large; its changed lines only remove the old stub indiff.patch, and I did not read the full file at head.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T13:09:33Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the available source supports the implemented behavior, but I could not verify the complete changed export file or run the checks.
What I ran
Reviewed head
b4195672d603cb27530713dbc099faeed04417a1. No commands or tests were run; source was inspected with the review reader. Read the description, commits, diff, manifest, review-folder README,WebKitValueExports.hpp,URL.cpp,RegistrableDomain.cpp, the debt note,PublicSuffix.cpp,CustomHeaderFields.cpp,WtfString.cpp,Types.hpp, and the relevantCMakeLists.txtrange.Export.cppwas excluded from the review folder and checked only by targeted search;InventoryExports.hppwas listed but its full text was not read.Results
Findings
Blocking
None identified in the source inspected.
Non-blocking
None.
Not verified
The full contents of
Export.cppandInventoryExports.hppwere not read.Export.cppwas searched forWKRegistrableDomainCreateand had no matches, consistent with the diff removing the prior stub; the full file remains unverified. No build, test, convention, or debt-fold checks were run. PS5 behavior was not tested.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T07:44:22Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected implementation and tests support merging.
What I ran
Reviewed head
4adbc1cc570befcb8a91f0ca1b5124b28100c308. I read the prepared description, commit summary, manifest, diff, and the changed implementation, declaration, test, and debt note. I also read the existing public suffix implementation and its tests, the WTF string conversion implementation, and the related custom header caller. No test commands were run;repo_read.pywas used to inspect pinned source.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 not read; their changed lines remove the previous stub export and inventory declaration. Automated checks and runtime behavior on PS5 were not verified. The description's claims that convention and debt checks passed are author-reported, not runs performed for this review.To get this to a good state
Nothing is required.