feat(libSceNKWebKit): implement WebCore::SecurityOriginData equality #24550

Merged
amer760 merged 1 commit from upstream-pr/24550 into main 2026-11-23 17:06:20 +00:00
amer760 commented 2026-11-20 19:26:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by amer760 on 2026-11-20T19:26:22Z.


What

Implements WebCore::operator==(const SecurityOriginData&, const SecurityOriginData&), following SecurityOriginData.cpp and std::variant equality over the existing tuple/opaque layout in SecurityOriginAbi.hpp: the same object is equal, different alternatives are not, tuples compare protocol, host (WTF::equal) and the optional port, opaque origins compare both identifiers, two valueless values are equal, and an invalid index throws. The export is in its own file because several open PRs edit SecurityOrigin.cpp.

Tested

Windows 11, MSYS2 UCRT64 GCC 16.2.0, Release. New nkwebkit_securityorigindataequality test covers equal and differing protocols, hosts, case, ports (engaged or not), null versus empty strings, opaque identifiers, mixed alternatives, valueless values, invalid indices and null arguments, in both argument orders. All 172 nkwebkit ctest tests pass. python3 tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py needs gh, which is not installed here; instead every open PR head was merged with git merge-tree against this branch: the only new conflicts are adjacent removed stubs with #24161 and #24165.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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:5419054447 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24550). Originally posted by [amer760](https://github.com/amer760) on 2026-11-20T19:26:22Z. --- ### What Implements `WebCore::operator==(const SecurityOriginData&, const SecurityOriginData&)`, following [SecurityOriginData.cpp](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/page/SecurityOriginData.cpp#L158-L164) and `std::variant` equality over the existing tuple/opaque layout in `SecurityOriginAbi.hpp`: the same object is equal, different alternatives are not, tuples compare protocol, host (`WTF::equal`) and the optional port, opaque origins compare both identifiers, two valueless values are equal, and an invalid index throws. The export is in its own file because several open PRs edit `SecurityOrigin.cpp`. ### Tested Windows 11, MSYS2 UCRT64 GCC 16.2.0, Release. New `nkwebkit_securityorigindataequality` test covers equal and differing protocols, hosts, case, ports (engaged or not), null versus empty strings, opaque identifiers, mixed alternatives, valueless values, invalid indices and null arguments, in both argument orders. All 172 `nkwebkit` ctest tests pass. `python3 tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` needs `gh`, which is not installed here; instead every open PR head was merged with `git merge-tree` against this branch: the only new conflicts are adjacent removed stubs with #24161 and #24165. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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)
MarcZX10 commented 2026-11-20 19:38:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:38:28Z.

Review: APPROVED


Reviewed — looks good

The implementation and its focused tests are consistent with the stated equality behavior at head ff7350335eddfbff4ed70a6dc22dacc940a6e818; I found no verified blocking defect.

What I ran

  • Read the supplied diff and changed-file sources at the pinned head. No commands or tests were run.

Results

Check Result Note
Diff and implementation review passed Equality cases and ABI declarations inspected
Test execution not run Results in the description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Did not run the reported 172 tests, conventions check, or merge-tree checks.
  • Read changed files: SecurityOriginDataEqualityExports.hpp, libSceNKWebKit.hpp, SecurityOriginDataEquality.cpp, tests/SecurityOriginDataEquality.cpp, and docs/dev/debt/changes/feat-nkwebkit-security-origin-data-equality.md.
  • Export.cpp and include/InventoryExports.hpp were excluded from the review folder as too large. Their removed declarations are visible in the supplied diff; their full text was not read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5998347057 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24550#pullrequestreview-5998347057). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T19:38:28Z. **Review:** APPROVED --- # Reviewed — looks good The implementation and its focused tests are consistent with the stated equality behavior at head `ff7350335eddfbff4ed70a6dc22dacc940a6e818`; I found no verified blocking defect. ## What I ran - Read the supplied diff and changed-file sources at the pinned head. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and implementation review | passed | Equality cases and ABI declarations inspected | | Test execution | not run | Results in the description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - Did not run the reported 172 tests, conventions check, or merge-tree checks. - Read changed files: `SecurityOriginDataEqualityExports.hpp`, `libSceNKWebKit.hpp`, `SecurityOriginDataEquality.cpp`, `tests/SecurityOriginDataEquality.cpp`, and `docs/dev/debt/changes/feat-nkwebkit-security-origin-data-equality.md`. - `Export.cpp` and `include/InventoryExports.hpp` were excluded from the review folder as too large. Their removed declarations are visible in the supplied diff; their full text was not read. ## To get this to a good state Nothing is required.
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!24550
No description provided.