Repository navigation
fix(libSceNKWebKit): copy JSObjectMakeDeferredPromise outputs through GuestCopyOut - #22276
Gruzzberry wants to merge 1 commit into
Conversation
… GuestCopyOut Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
The copy-out result is ignored in both calls, so an unwritable resolve or reject pointer is dropped silently and the handle is leaked. The checked-copy pattern in DateParsing.cpp (parseDateFromNullTerminatedCharacters) throws std::invalid_argument when GuestCopyOut_nid_no_patch returns false. Please do the same here: check both return values, throw std::invalid_argument(std::string(func) + ": unwritable guest resolve pointer faults in WebKit") (and the reject equivalent), and release funcs[1] and the promise before throwing. A test in core/libs/prx/libSceNKWebKit/tests/Jsc.cpp that passes an unwritable pointer and expects the throw would pin it. |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change routes the two optional deferred-promise outputs through the checked guest-memory copy helper; I found no verified blocking defect in the reviewed path.
What I ran
Reviewed head 23c82bd92d0a3893e6b23d3761c693985315aa2c. I used the pinned repo_read.py reader interface to inspect the prepared diff and targeted code. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | One changed source file reviewed |
| Build and tests | not run | No execution performed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports the conventions check passed and compilation was unavailable; neither was run or independently confirmed in this review. No runtime test was run. The changed file was read at the affected function and in relevant surrounding context; files.json was unavailable through the reader interface, so the reviewed-file inventory could not be cross-checked against it. The changed file is core/libs/prx/libSceNKWebKit/src/JscObject.cpp; no files were excluded by the manifest.
To get this to a good state
Nothing is required.
|
Closing as announced in the earlier comment on the combined-PR plan: this is one of several small same-library singles, and the combined PRs did not arrive within the 3 days given. Reviewers left it at changes requested and it has had no update since. Please reopen it as part of one combined PR per library if you still want it. |
What
JSObjectMakeDeferredPromisein libSceNKWebKit wrote the resolve and reject handles straight through the title-suppliedJSObjectRef*pointers. It now copies them out withGuestCopyOut_nid_no_patch. Valid pointers behave exactly as before.Tested
Not compiled: there is no C++ compiler on this machine.
tools/check_conventions.py --base upstream/mainpasses. I checked for duplicates with a script that compares this file against the changed files of every open PR; it found none, both before the commit and before the push.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)🤖 Generated with Claude Code