feat(libSceNKWebKit): implement WKApplicationCacheManager cache operations #16937

Merged
adriaespii merged 1 commit from upstream-pr/16937 into main 2026-11-12 11:22:15 +00:00
adriaespii commented 2026-11-07 23:56:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriaespii on 2026-11-07T23:56:40Z.


What

Implement WKApplicationCacheManager cache operations (WKApplicationCacheManagerDeleteAllEntries, WKApplicationCacheManagerDeleteEntriesForOrigin, WKApplicationCacheManagerGetApplicationCacheOrigins).

Tested

Unit tests in core/libs/prx/libSceNKWebKit/tests/ApplicationCacheManager.cpp, conventions verified with tools/check_conventions.py.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5207007961 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16937). Originally posted by [adriaespii](https://github.com/adriaespii) on 2026-11-07T23:56:40Z. --- ### What Implement `WKApplicationCacheManager` cache operations (`WKApplicationCacheManagerDeleteAllEntries`, `WKApplicationCacheManagerDeleteEntriesForOrigin`, `WKApplicationCacheManagerGetApplicationCacheOrigins`). ### Tested Unit tests in `core/libs/prx/libSceNKWebKit/tests/ApplicationCacheManager.cpp`, conventions verified with `tools/check_conventions.py`. ### Checklist - [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
adriadam10 commented 2026-11-11 23:51:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-11T23:51:45Z.

Review: CHANGES_REQUESTED


Agreeing with the review above. The pinned PS5 WebKit (80f77e94c6, Source/WebKit/UIProcess/API/C/WKApplicationCacheManager.cpp) has empty bodies for all three exports, and this PR changes that:

  • WKApplicationCacheManagerGetApplicationCacheOrigins never calls its callback in the source; here it calls it with an empty array, and that array is never released (ToRef hands out a reference nothing frees).
  • WKApplicationCacheManagerDeleteEntriesForOrigin and WKApplicationCacheManagerDeleteAllEntries ignore their arguments in the source; here the first throws invalid_argument for non-origin objects and both validate the manager ref.
  • Nothing outside the test fills ApplicationCacheManager::origins, so the list logic is unreachable in practice.

Please make the three exports match the pinned source (empty bodies, no origin list, no new SecurityOrigin move into Types.hpp unless something else needs it), update the test to pin that, and drop the Silent stubs entry. If you think the console binary differs from the source, say so in the debt entry with the evidence.

The branch also conflicts with main now (docs/dev/debt/libSceNKWebKit.md); it needs a merge of main.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5866901291 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16937#pullrequestreview-5866901291). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-11-11T23:51:45Z. **Review:** CHANGES_REQUESTED --- Agreeing with the review above. The pinned PS5 WebKit (`80f77e94c6`, `Source/WebKit/UIProcess/API/C/WKApplicationCacheManager.cpp`) has empty bodies for all three exports, and this PR changes that: - `WKApplicationCacheManagerGetApplicationCacheOrigins` never calls its callback in the source; here it calls it with an empty array, and that array is never released (`ToRef` hands out a reference nothing frees). - `WKApplicationCacheManagerDeleteEntriesForOrigin` and `WKApplicationCacheManagerDeleteAllEntries` ignore their arguments in the source; here the first throws `invalid_argument` for non-origin objects and both validate the manager ref. - Nothing outside the test fills `ApplicationCacheManager::origins`, so the list logic is unreachable in practice. Please make the three exports match the pinned source (empty bodies, no origin list, no new `SecurityOrigin` move into `Types.hpp` unless something else needs it), update the test to pin that, and drop the Silent stubs entry. If you think the console binary differs from the source, say so in the debt entry with the evidence. The branch also conflicts with `main` now (`docs/dev/debt/libSceNKWebKit.md`); it needs a merge of `main`.
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!16937
No description provided.