feat(libSceNKWebKit): implement PAL::KillRing #19305

Closed
B-Howell wants to merge 4 commits from upstream-pr/19305 into main
B-Howell commented 2026-11-13 02:48:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-11-13T02:48:44Z.


What

Implements the five PAL::KillRing exports that threw: append, prepend, yank, startNewSequence and setToYankedState. They follow the PS5 WebKit source already pinned in the debt file. PlatformPlayStation.cmake builds text/KillRing.cpp, and its non-Mac branch (KillRing.cpp) leaves four of the bodies empty and has yank return String(). Here yank returns a null NKWebKit::WtfAbi::String through the hidden result pointer, and the declarations move from InventoryExports.hpp to typed prototypes in WtfExports.hpp, next to PAL::SessionID. PAL::KillRing is an empty class (static_asserts on its size and emptiness). The five debt rows are removed, and a debt entry records that the behaviour has not been compared with a console module.

Tested

Ubuntu WSL2, GCC, Release, Ninja.

  • Red control (on f19e64ad6e4): with the new test and typed header but the Export.cpp stubs still in place, nkwebkit_palkillring fails: Subprocess aborted, _ZN3PAL8KillRing4yankEv not implemented.
  • With this change, on 4a4b198921a (main 11392ec8ef9 merged in): nkwebkit_palkillring passes 3/3. It checks that yank returns a null impl before and after append/prepend, that the string arguments keep their contents and reference counts, and that NotImplementedCalls does not change.
  • Before the merge, on 2759978445e: nkwebkit_noops, nkwebkit_palsessionid, nkwebkit_wtf and nkwebkit_contenttype pass, and public_headers passes 65/65. The merge brought no change near these files.
  • tools/progress.py: libraries done goes from 15577 on main to 15582 (+5) out of 39251.
  • Debt: the inventory count goes from main's 5950 to 5945, for the five declarations this PR implements.
  • On dc7c599ecc6: the test no longer redeclares NotImplementedCalls_nid_no_patch with APS5_VABI, which failed to compile on Windows GCC (report); it uses the General.hpp declaration, as Forwarding.cpp does. nkwebkit_palkillring passes 3/3 on Linux; Windows not rebuilt locally.
  • On 1f0b5e1cfee, an ordinary merge of main at 82160bba912 after #18538, conventions passed; doc-only conflict on the count line; count is main's stated 5949 minus this change's 5 removed stubs (5944). Main's code changes since the last merge are over 1,000 lines from this PR's hunks, so the earlier test results stand.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5289064856 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19305). Originally posted by [B-Howell](https://github.com/B-Howell) on 2026-11-13T02:48:44Z. --- ### What Implements the five `PAL::KillRing` exports that threw: `append`, `prepend`, `yank`, `startNewSequence` and `setToYankedState`. They follow the PS5 WebKit source already pinned in the debt file. [PlatformPlayStation.cmake](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/PAL/pal/PlatformPlayStation.cmake) builds `text/KillRing.cpp`, and its non-Mac branch ([KillRing.cpp](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/PAL/pal/text/KillRing.cpp)) leaves four of the bodies empty and has `yank` return `String()`. Here `yank` returns a null `NKWebKit::WtfAbi::String` through the hidden result pointer, and the declarations move from `InventoryExports.hpp` to typed prototypes in `WtfExports.hpp`, next to `PAL::SessionID`. `PAL::KillRing` is an empty class (static_asserts on its size and emptiness). The five debt rows are removed, and a debt entry records that the behaviour has not been compared with a console module. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu WSL2, GCC, Release, Ninja. - Red control (on `f19e64ad6e4`): with the new test and typed header but the `Export.cpp` stubs still in place, `nkwebkit_palkillring` fails: `Subprocess aborted`, `_ZN3PAL8KillRing4yankEv not implemented`. - With this change, on `4a4b198921a` (main `11392ec8ef9` merged in): `nkwebkit_palkillring` passes 3/3. It checks that `yank` returns a null impl before and after `append`/`prepend`, that the string arguments keep their contents and reference counts, and that `NotImplementedCalls` does not change. - Before the merge, on `2759978445e`: `nkwebkit_noops`, `nkwebkit_palsessionid`, `nkwebkit_wtf` and `nkwebkit_contenttype` pass, and `public_headers` passes 65/65. The merge brought no change near these files. - `tools/progress.py`: libraries done goes from 15577 on main to 15582 (+5) out of 39251. - Debt: the inventory count goes from main's 5950 to 5945, for the five declarations this PR implements. - On `dc7c599ecc6`: the test no longer redeclares `NotImplementedCalls_nid_no_patch` with `APS5_VABI`, which failed to compile on Windows GCC ([report](https://github.com/boykopovar/AnyPS5/pull/19305#issuecomment-6842889958)); it uses the `General.hpp` declaration, as `Forwarding.cpp` does. `nkwebkit_palkillring` passes 3/3 on Linux; Windows not rebuilt locally. - On `1f0b5e1cfee`, an ordinary merge of `main` at `82160bba912` after #18538, conventions passed; doc-only conflict on the count line; count is main's stated 5949 minus this change's 5 removed stubs (5944). Main's code changes since the last merge are over 1,000 lines from this PR's hunks, so the earlier test results stand. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!19305
No description provided.