feat(libSceNKWebKit): implement WebCore::ResourceErrorBase setType and isolatedCopy #23083
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23083"
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 FinleyLaempe on 2026-11-18T17:51:01Z.
What
Implements
WebCore::ResourceErrorBase::setType(WebCore::ResourceErrorBase::Type)andWebCore::ResourceErrorBase::isolatedCopy()in libSceNKWebKit, replacing theirNotImplemented_nid_no_patchstubs inExport.cpp.isolatedCopyfollows ResourceErrorCurl.cpp:51-54. The newResourceError.cppcarries the upstream Apple and Sony notices.ResourceErrorAbi.hpp, the 80-byte guestResourceErrorlayout (the base members from pinned ResourceErrorBase.h:101-106 plus the CurltlsVerificationErrormembers from curl/ResourceError.h:68-69); it adds nothing to that header.lazyInitstays main's no-op export from #23753. UpstreamisolatedCopycalls it first, but the CurlResourceErrordoes not shadowplatformLazyInit, so the call does nothing and is left out.isolatedCopycopiesdomain,errorCode,failingURL,localizedDescription,typeand the two TLS fields;isSanitizedis left unset because upstream'sdoPlatformIsolatedCopydoes not copy it.WTF::String::isolatedCopyexport declared inWtfValueExports.hpp; the failing URL keeps itsWtfAbi::URLbit fields fromWtfStringAbi.hppand only swaps in the isolated string impl.thisthrowsstd::invalid_argumentin both exports.setTypeassigns the value without validating it, as upstream does beyond its ASSERT.Export.cpp, their declarations move fromInventoryExports.hppto the newResourceErrorExports.hpp, andlibSceNKWebKit.hppgains the include. No other existing file changes.tests/ResourceError.cppcoverssetTypeacross all five enum values and an out-of-range cast, andisolatedCopyon populated, null and empty-string errors, including refcounts and the original objects staying untouched.docs/dev/debt/changes/feat-nkwebkit-resource-error-base.mdadds the implementation entry, marked "not compared with a console module" (closes when compared), and removes the two Unknown-function-info rowsO9YsW44maCsandRIXLOUDwuUg.Tested
Arch Linux x86-64, GCC 16.2.1, Release build with
-DBUILD_TESTING=ON: the newnkwebkit_resourceerrortest and every othernkwebkit_*test, 330 of 330 passed on head51ede50db2(main merged in).python3 tools/check_conventions.py --base upstream/mainpasses. Not tested on a console or on Windows.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 copilot-pull-request-reviewer[bot] on 2026-11-18T17:51:09Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T17:53:46Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
1f359f0168:tools/check_conventions.pypassed.nkwebkit_resourceerror_testsbuilt cleanly.nkwebkit_resourceerror):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ResourceError.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-20T06:16:14Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed implementation and tests show no verified blocking defect; approval is not justified because the reported checks were not run in this review.
What I ran
Reviewed head
efa76c28702d32eb36009c1b65d3071db941e384using the prepared diff and repository reader. No test or convention command was run.Results
Negative control
Not run; no test command was available in this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests, convention checks, console behavior, or Windows behavior were run. The author-reported results were not independently verified. All seven changed files were read, including the changed hunks in
Export.cppandInventoryExports.hpp, which were excluded from the prepared full-text bundle.To get this to a good state
Nothing is required. Optional: run the reported test suite and convention check on this head before merging.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:32Z.
Review: COMMENTED
Built the branch’s changed sources and ran ResourceError on Linux against the existing runtime libraries. The test run passed and covered the ResourceError type, initialization, and isolated copy cases.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T23:49:47Z.
Review: COMMENTED
Actionable comments
02a05255-1443-4d46-b527-8d5d66bbd92bReviewing files that changed from the base of the PR and between
5ff6ec4365and51ede50db2.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/include/ResourceErrorExports.hppcore/libs/prx/libSceNKWebKit/libSceNKWebKit.hppcore/libs/prx/libSceNKWebKit/src/ResourceError.cppcore/libs/prx/libSceNKWebKit/tests/ResourceError.cppdocs/dev/debt/changes/feat-nkwebkit-resource-error-base.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T00:19:51Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation matches the described field-copy behavior, with one optional exception-path ownership improvement.
What I ran
Reviewed head
51ede50db2bcdd968941f5da119ea06fe3b48b5e. I inspected the prepared diff and files, and usedrepo_read.pyto read the CMake source/test globs, the ResourceError ABI layout, and theString::isolatedCopydeclaration. I did not run tests or builds. The test results in the PR description are author-reported.Files read: all seven files listed as reviewed in
files.json;Export.cppandInventoryExports.hppwere reviewed at their changed diff hunks. No files were excluded by the review rules.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceNKWebKit/src/ResourceError.cpp:89: If a laterIsolatedCopyStringcall throws, earlier returned strings hold owned references but the plainStringwrappers do not release them during unwinding. Consider guarding each result with an owning RAII wrapper until it is transferred tocopy.Not verified
The reported tests and convention check were not run during this review. Console module behavior and Windows behavior were not verified. The implementation’s compatibility with a console module is also marked as unverified in the added debt entry.
To get this to a good state
Nothing is required. Optionally, add RAII ownership for the intermediate isolated strings so an exception during a later copy releases earlier results.
Pull request closed