feat(libSceNKWebKit): implement the WebCore::MessagePortChannel processForPort and hasAnyMessagesPendingOrInFlight exports #24019
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24019"
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 RiverWhy on 2026-11-20T01:05:10Z.
What
Implements 2
libSceNKWebKitexports ofWebCore::MessagePortChannel. Both throwNotImplementedonmaintoday.processForPort(const MessagePortIdentifier&): returns the process entangled with the given port (m_processes[0]when the port equalsm_ports[0], otherwisem_processes[1]). Thestd::optional<ProcessIdentifier>comes back in registers: the value inrax, the engaged byte indl.hasAnyMessagesPendingOrInFlight() const: true whenm_messageBatchesInFlightis non-zero or either pending message vector is non-empty.Source: the
libSceNKWebKit.sprxwith SHA-2563af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d. The logic follows the pinned WebKitMessagePortChannel.cpp(licence notice kept). The object offsets come from the module's own code and match the pinnedMessagePortChannel.h: ports at0x8and0x18(16 bytes each), process slots at0x30and0x40(value plus engaged byte), pending message vector sizes at0x6cand0x7c, batches in flight at0xa0. They live in the newsrc/MessagePortChannelAbi.hpp.Only the fields the two functions read were checked against the module; the other members are laid out from the pinned header.
Debt: the fragment
docs/dev/debt/changes/feat-nkwebkit-message-port-channel.mdadds the Functional entry and removes thehasAnyMessagesPendingOrInFlightinventory row (processForPorthad no inventory row).Overlap: no open PR matches
MessagePortChannel, and on currentorigin/mainboth are still only theNotImplementedstubs.How it was checked
Offline, against the module's own code (none of it is in the repository): both function bodies were disassembled and their byte blobs run against this implementation in a harness.
In the repository, the new
nkwebkit_messageportchanneltest builds channel objects in memory and checks both exports, including a port matching in only one of its two words, an unengaged process slot, vector capacity without size, and the field offsets.Tested
Linux Mint 22.3, GCC 13.3, Release:
nkwebkit_messageportchannelpasses (100% of the 1 test selected).tools/check_conventions.pypasses.core/libs/tests/test_public_headers.py --audit-onlypasses.git merge-treeagainst currentorigin/mainis clean.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
New Features
Tests
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T01:23:28Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
ba7902e762:tools/check_conventions.pyfailed.nkwebkit_messageportchannel_testsbuilt cleanly.nkwebkit_messageportchannel):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T06:31:34Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation follows the described field checks and includes focused tests; I did not run the reported checks, and two changed files were excluded from the review folder.
What I ran
Reviewed head
ba7902e762955bf591da8bcb10fa4ffdae457320using the prepared diff and pinned repository reader. No build or test commands were run.Results
Findings
Blocking
None identified in the files read.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere excluded from the prepared review folder and were not read. The author reports thatnkwebkit_messageportchannel,tools/check_conventions.py, andcore/libs/tests/test_public_headers.py --audit-onlypassed on Linux Mint 22.3 with GCC 13.3; these results were not independently verified. Windows behavior was not run.Files read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNKWebKit/include/MessagePortChannelExports.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/src/MessagePortChannel.cpp,core/libs/prx/libSceNKWebKit/src/MessagePortChannelAbi.hpp,core/libs/prx/libSceNKWebKit/tests/MessagePortChannel.cpp, anddocs/dev/debt/changes/feat-nkwebkit-message-port-channel.md. Excluded changed files:core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hpp.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T19:03:25Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
86601da188:tools/check_conventions.pypassed.nkwebkit_messageportchannel_testsbuilt cleanly.nkwebkit_messageportchannel):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/MessagePortChannel.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-21T03:03:27Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes at head
86601da18889c31d23db6f00adcecdf074fc1e94have no verified blocking defects; the implementation and its targeted tests support merging.What I ran
Read the prepared diff and relevant changed source at the pinned head. No commands or tests were run. The description reports Linux Mint/GCC test and convention checks; those results were not independently run here.
Results
Findings
Blocking
None found in the read code.
Non-blocking
None.
Not verified
Export.cppandinclude/InventoryExports.hppare marked too large for the prepared folder. I read the changed regions of each through the pinned reader, but not their full text. The completeLegacyExports.hpptext was available but only its touched region was read. The review-folder exclusion listing was unavailable. The PR's reported module disassembly/harness checks, reported test commands, Windows behavior, and console behavior were not independently verified. Could not run the repository reader as a command or execute checks in this environment.Files read:
description.md,commits.md,manifest.json,diff.patch; changed source filesinclude/LegacyExports.hpp,include/MessagePortChannelExports.hpp,libSceNKWebKit.hpp,src/MessagePortChannel.cpp,src/MessagePortChannelAbi.hpp,tests/MessagePortChannel.cpp, anddocs/dev/debt/changes/feat-nkwebkit-message-port-channel.md; relevant changed regions ofExport.cppandinclude/InventoryExports.hpp.files.jsonwas not available.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T03:48:26Z.
Review: COMMENTED
Architecture findings (1)
Advisory architecture findings (1)
8be32171-de8d-4b31-b4b9-d38ce54820fcReviewing files that changed from the base of the PR and between
aecfbf79b1and260920b7d6.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/include/LegacyExports.hppcore/libs/prx/libSceNKWebKit/include/MessagePortChannelExports.hppcore/libs/prx/libSceNKWebKit/libSceNKWebKit.hppcore/libs/prx/libSceNKWebKit/src/MessagePortChannel.cppcore/libs/prx/libSceNKWebKit/src/MessagePortChannelAbi.hppcore/libs/prx/libSceNKWebKit/tests/MessagePortChannel.cppdocs/dev/debt/changes/feat-nkwebkit-message-port-channel.mdLimit details: You’ve used all 10 included reviews currently available.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T05:54:19Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected implementation and tests support merging.
What I ran
Reviewed head
260920b7d6a7c6aaaaf991fcdc3b5596efc1b799. I inspected the prepared diff and manifest, plus the pinned source for the changed functions. No test commands were run; reported test results below are from the PR description.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
Export.cppwas excluded by the review folder size rule; I read the relevant source ranges around the removed stubs. The changed header filesInventoryExports.hppandLegacyExports.hppwere listed as included but were not read. I did not inspect the test build registration, run the tests, verify the binary module or its offsets, or test on Windows or a console. The author reports the Linux test, conventions check, public headers audit, and merge-tree check passed.Files read:
description.md,commits.md,manifest.json,diff.patch,Export.cpprelevant ranges, and the added test, implementation, ABI, exports, and debt files as shown in the diff. Files excluded by the review folder:Export.cppfull text (too large).InventoryExports.hppandLegacyExports.hppwere not inspected.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:47:16Z.
Review: COMMENTED
Built the branch’s changed sources and ran
MessagePortChannelon Linux against the existing runtime libraries. The test run passed and covered the process lookup and pending-or-in-flight state queries.AI-assisted: yes.
Pull request closed