feat(libSceNKWebKit): call the changed hook from the six HistoryItem … #16833

Closed
majnoon40 wants to merge 1 commit from upstream-pr/16833 into main
majnoon40 commented 2026-11-07 17:38:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by majnoon40 on 2026-11-07T17:38:21Z.


What

The six WebCore::HistoryItem setters that in firmware tail-jump through the function pointer in
data export TL1XjYe1xLo — setURLString, setOriginalURLString, setReferrer, setTitle,
setAlternateTitle and setShouldRestoreScrollPosition — now call it, through the internal
historyItemChangedHook pointer that defaults to a no-op, as the console's does before its module
installs a handler (BunnyFl's disassembly of the 13.42 module, recorded on #15230). The item is
passed as the argument; the other five setters keep storing and returning. The console's installed
handler, the internal code that installs it and the control-flow-integrity check stay unmodelled,
recorded in docs/dev/debt/libSceNKWebKit.md.

Tested

nkwebkit_historyitem passes on Linux (g++ 14.2; direct harness compiling src/HistoryItem.cpp,
src/WtfString.cpp, src/Bmalloc.cpp and tests/HistoryItem.cpp), including the new hook cases:
the default no-op call, each of the six setters calling the hook with the item pointer, and the
five plain setters not calling it; removing any of the six calls fails the suite (mutation-checked).
python3 tools/check_conventions.py --base origin/main passes with no findings.

Checklist

  • Based on current main (c38d0772c0, the merge of #15230 — this PR is a direct follow-up to it); 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
  • 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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5204247874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16833). Originally posted by [majnoon40](https://github.com/majnoon40) on 2026-11-07T17:38:21Z. --- ### What The six `WebCore::HistoryItem` setters that in firmware tail-jump through the function pointer in data export `TL1XjYe1xLo` — `setURLString`, `setOriginalURLString`, `setReferrer`, `setTitle`, `setAlternateTitle` and `setShouldRestoreScrollPosition` — now call it, through the internal `historyItemChangedHook` pointer that defaults to a no-op, as the console's does before its module installs a handler (BunnyFl's disassembly of the 13.42 module, recorded on #15230). The item is passed as the argument; the other five setters keep storing and returning. The console's installed handler, the internal code that installs it and the control-flow-integrity check stay unmodelled, recorded in `docs/dev/debt/libSceNKWebKit.md`. ### Tested `nkwebkit_historyitem` passes on Linux (g++ 14.2; direct harness compiling `src/HistoryItem.cpp`, `src/WtfString.cpp`, `src/Bmalloc.cpp` and `tests/HistoryItem.cpp`), including the new hook cases: the default no-op call, each of the six setters calling the hook with the item pointer, and the five plain setters not calling it; removing any of the six calls fails the suite (mutation-checked). `python3 tools/check_conventions.py --base origin/main` passes with no findings. ### Checklist - [x] Based on current `main` (`c38d0772c0`, the merge of #15230 — this PR is a direct follow-up to it); 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 - [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

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!16833
No description provided.