feat(libSceNKWebKit): implement WKError property getters #14860
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14860"
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-01T20:57:31Z.
What
Implement WebKit C API WKError property getters in libSceNKWebKit:
ullptr if unset (an explicitly present empty URL returns a URL reference with an empty string, matching oCopiedURLAPI).
Also added NKWebKit::Error type with retain/release support matching WebKit C API conventions and unit tests in Base.cpp.
Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T09:12:07Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
This pull request does not merge cleanly into
main(4f41f4c375): head f0f1b0c0dcb8ac372150cb1b19ae59ec9fc40c6d conflicts indocs/dev/debt/libSceNKWebKit.mdPlease rebase it onto current
main. I will review the change once it merges cleanly.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T09:30:20Z.
Review: CHANGES_REQUESTED
Re-checked — changes still requested
The new head
0ac6e3dis a rebase of5df733ad62onto currentmain. The code is the same. Only the count line indocs/dev/debt/libSceNKWebKit.mdchanged.WKErrorCopyFailingURLstill returns an empty URL where WebKit returns null, and the debt file still does not record that.What changed since my last review
No text from my previous review is available, so this re-check covers the whole change again.
I compared the PR's own diff at
5df733ad62(5df733ad62^..5df733ad62) with the one at0ac6e3d(0ac6e3d^..0ac6e3d):Export.cpp,Api.hpp,InventoryExports.hpp,WebKitValueExports.hpp,src/Error.cpp,src/Types.hppandtests/Base.cpp: the hunks are identical. Only blob indices and context differ, because of the rebase.docs/dev/debt/libSceNKWebKit.md, Additional callable exports line:5df733ad62the PR changed the count from 7439 to 7436.0ac6e3dthe count stays at 7437 (the value onmain), and the PR now removes the backticks aroundNotImplemented_nid_no_patch.What I ran
Head
0ac6e3d2322004ae4590189d34ae7a4ec946025c,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree96f18615113b00fbe319fb21b0266a28860f6221.git diff --checkcheck_conventions.pylibs(build.json)main(unwrap_self_..._inherits_the_destination_directory_group), not caused by this PRnkwebkit_base(my run)Base.cppfails to compile ('Error' is not a member of 'NKWebKit')git status --porcelainempty;nkwebkit_basepasses againPrevious findings
No text from my earlier review is available, so I can't list its findings. Below is the open finding from the other review comment, which I re-checked:
WKErrorCopyFailingURLreturns an empty URL instead of null whenfailingURLis unset (raised by oneandonlydean).core/libs/prx/libSceNKWebKit/src/Error.cpp:22:return NKWebKit::ToRef(NKWebKit::Make<NKWebKit::URL>(std::string()));.core/libs/prx/libSceNKWebKit/tests/Base.cpp:384-388.nullptrand change the test toRequire(WKErrorCopyFailingURL(emptyErrorRef) == nullptr). Or keep the empty URL and add a debt entry that names the difference and the reason.New findings
Blocking
None beyond the open finding above.
Non-blocking
docs/dev/debt/libSceNKWebKit.md:35).`NotImplemented_nid_no_patch`to plainNotImplemented_nid_no_patch. Every other entry in the file keeps the backticks.WKErrorCopyDomain,WKErrorCopyFailingURL,WKErrorGetErrorCode).main, or lower only the count by 3 after rebasing on #15151.Errorobject (core/libs/prx/libSceNKWebKit/src/Types.hpp:104).NKWebKit::Errorappears only inTypes.hppandsrc/Error.cpp. No load-failure or navigation path creates one, so for now the four getters only work on objects the test builds itself.core/libs/prx/libSceNKWebKit/Export.cpp:15-16, where the four stubs were removed. Cosmetic.Not verified
toCopiedURLAPInull-on-empty behaviour against the source myself (no network). I am relying on the pinnedWKErrorRef.cpp/WKSharedAPICast.hlinks in oneandonlydean's comment.WKErrorCopyLocalizedDescriptionis not named in the description or the inventory table. The export was already declared inApi.hpponmain, and I did not check its NID.5df733ad62(same code).To get this to a good state
WKErrorCopyFailingURLreturnnullptrfor an unset URL and updateBase.cpp:384-388. Or record the empty-URL difference indocs/dev/debt/libSceNKWebKit.mdwith its reason.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-06T21:23:05Z.
Review: CHANGES_REQUESTED
core/libs/prx/libSceNKWebKit/src/Error.cpp:22:WKErrorCopyFailingURLreturns a new emptyURLwhenfailingURLis unset, andtests/Base.cpp:384-388asserts it. WebKit'sWKErrorCopyFailingURLgoes throughtoCopiedURLAPI, which returnsnullptrfor an empty string (as @oneandonlydean pointed out on 2026-11-01). Return a null reference there and update the test (drop theWKURLCopyStringon it, check for null), or keep the empty URL and record the difference and its reason indocs/dev/debt/libSceNKWebKit.md.mainindocs/dev/debt/libSceNKWebKit.md(the "Additional callable exports" count line). #15151 is meant to land first and edits the same line; please rebase after it and recompute the count.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T21:42:40Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: return an empty URL reference when the failing URL is unset or empty, matching the stated API behavior.
What I ran
Reviewed head
8eedb58986cd3bd4877ba239cc2a6758668b8eb0using the prepared review artifacts andrepo_read.py. No tests or build commands were run; the Linux test result in the description is author-reported.Results
Findings
Blocking
core/libs/prx/libSceNKWebKit/src/Error.cpp:23returnsnullptrwhen the failing URL is unset or empty, while the PR description specifies an empty string reference. Callers expecting a copyable URL/string reference can receive null instead. Return an empty URL reference for this case and update the corresponding tests.Non-blocking
None.
Not verified
The description’s
ctest -R nkwebkit_base -Vresult was not independently verified.Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwere excluded from the prepared full-text files; their changes were inspected only indiff.patch. Other repository behavior and console behavior were not run.Files read:
description.md,commits.md,manifest.json,diff.patch,Api.hpp,WebKitValueExports.hpp,Error.cpp,Types.hpp,Base.cpp,Object.hpp, and the beginning ofExport.cpp. Files listed as reviewed in the manifest but not read in full:Export.cpp,InventoryExports.hpp,docs/dev/debt/libSceNKWebKit.md.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T16:50:01Z.
Review: COMMENTED
Reviewed — comments
The new getters and their unit tests are present, but the review is incomplete because the export files were not fully read and the reported test run was not independently verified.
What I ran
a98ee8cc258e3600de592ddf3b0d5ef6a8b8e6c4usingrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
WKErrorCopyFailingURLreturns an empty string when unset, while the implementation and test return/assertnullptr(core/libs/prx/libSceNKWebKit/src/Error.cpp:23-24). Align the description with the intended URL-reference behavior.Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere not read; only their changed hunks were inspected.ctest -R nkwebkit_base -Vresult was not independently confirmed.review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNKWebKit/include/Api.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/Error.cpp,core/libs/prx/libSceNKWebKit/src/Types.hpp,core/libs/prx/libSceNKWebKit/src/Object.hpp, and the relevant range ofcore/libs/prx/libSceNKWebKit/tests/Base.cpp.Export.cppandInventoryExports.hppwas unavailable in the review folder; only their diff hunks were inspected. The changed debt note was inspected in the diff.To get this to a good state
Nothing is required. Optional: clarify the failing URL unset behavior in the description.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:49:07Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation and focused tests support the stated getter behavior, though the tests were not run in this review.
What I ran
Reviewed head
afec32c8463e0e22a1aa29c7b80ac6d76a3e2776usingrepo_read.pyto inspect the prepared description, commits, manifest, diff, and targeted source at the pinned head. No tests or build commands were run. The changed files whose full text was available in the review folder were read where relevant;Export.cppandInventoryExports.hppwere excluded from the folder and inspected only at the changed declaration locations through the reader.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports convention and debt checks passed and describes
TestErrorcoverage; those checks and tests were not run here. Physical PS5 behavior was not verified. The complete text ofExport.cppandInventoryExports.hppwas not read; only their changed portions were reviewed. Other changed files listed in the manifest were read:Api.hpp,WebKitValueExports.hpp,Error.cpp,Types.hpp,Base.cpp, andwkerror-getters.md.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:55:12Z.
Review: APPROVED
Reviewed — looks good
The inspected implementation matches the stated getter behavior, and no concrete blocking defect was found in the files read.
What I ran
844bb6792fc9c77e5a3b15b7bead9b58360218e1.TestError; those results were not independently verified.description.md,commits.md,manifest.json,diff.patch, and the full changed filesApi.hpp,WebKitValueExports.hpp,Error.cpp,Types.hpp,Base.cpp, andwkerror-getters.md. Read relevant ranges ofExport.cppandInventoryExports.hppthrough the pinned reader.files.jsonwas not available; the manifest lists those two large files as excluded from the review folder, and the pinned reader was used to inspect their relevant ranges.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Export.cppandInventoryExports.hppfiles were not read; only relevant ranges were inspected. Other repository files were not reviewed.To get this to a good state
Nothing is required.
Pull request closed