Skip to content

feat(nkwebkit): implement empty new-window policy callback - #17805

Draft
alvaroelpob wants to merge 5 commits into
boykopovar:mainfrom
alvaroelpob:feat/nkwebkit-empty-window-policy-callback
Draft

alvaroelpob wants to merge 5 commits into
boykopovar:mainfrom
alvaroelpob:feat/nkwebkit-empty-window-policy-callback

Conversation

@alvaroelpob

@alvaroelpob alvaroelpob commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What

Implement EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction as the no-op defined by pinned WebKit 11.x and correct its declaration to void.
On hold: EmptyFrameLoaderClient cannot be constructed yet (its four constructors throw and the module has no vtable for it), so no caller reaches this member until the client can be created.

Tested

Linux: suite.py feat/nkwebkit-empty-window-policy-callback at e49592a: CTest 6573/6574 passed; guest_libressl_tls_engine_transport failed once and passed on rerun; conventions passed.

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

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Progress report (76de27b → e49592a)

📈 System libraries: 45.42% (+0.0025%, +1 implemented function)

✅ 1 implemented
Library Name
libSceNKWebKit _ZN7WebCore22EmptyFrameLoaderClient38dispatchDecidePolicyForNewWindowActionERKNS_16NavigationActionERKNS_15ResourceRequestEPNS_9FormStateERKN3WTF6StringENS_21PolicyCheckIdentifierEONS9_8FunctionIFvNS_12PolicyActionESD_EEE
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceNKWebKit _ZN7WebCore22EmptyFrameLoaderClient38dispatchDecidePolicyForNewWindowActionERKNS_16NavigationActionERKNS_15ResourceRequestEPNS_9FormStateERKN3WTF6StringENS_21PolicyCheckIdentifierEONS9_8FunctionIFvNS_12PolicyActionESD_EEE

Changed libraries (implemented exports)

Library Before After Change
libSceNKWebKit 3913/11252 (34.78%) 3914/11252 (34.78%) +0.01%

@alvaroelpob
alvaroelpob marked this pull request as ready for review November 9, 2026 16:56
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Exports with a name or library/NID already present in main:

  • _ZN7WebCore22EmptyFrameLoaderClient38dispatchDecidePolicyForNewWindowActionERKNS_16NavigationActionERKNS_15ResourceRequestEPNS_9FormStateERKN3WTF6StringENS_21PolicyCheckIdentifierEONS9_8FunctionIFvNS_12PolicyActionESD_EEE (same library/NID already present: core/libs/prx/libSceNKWebKit (EJJiV41CZgA))

@JJenkx

JJenkx commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 050ac04471, merged onto main 02452319ce (8c9f0c74b7, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • nkwebkit_emptyframeloadernewwindowpolicy passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@alvaroelpob
alvaroelpob force-pushed the feat/nkwebkit-empty-window-policy-callback branch from 050ac04 to 1a992b3 Compare November 11, 2026 01:11
@alvaroelpob

Copy link
Copy Markdown
Contributor Author

Rebased onto main.

  • de29423: moved dispatchDecidePolicyForNewWindowAction into src/EmptyClients.cpp.
  • 5c42e1c: dropped the call-only test.
  • 1a992b3: fixed the debt link, cited c55364d53f97 EmptyClients.h, and decremented the older-export counters.

@ycbuzi

ycbuzi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Tested 1a992b34c7 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 41 tests failed out of 4997; 99% tests passed, 41 tests failed out of 4997. 41 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 15 tests failed out of 4997; 99% tests passed, 15 tests failed out of 4997. 15 of the failing tests fail on main too. run

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The callback implementation and corrected declaration are consistent with the stated no-op behavior; the change is limited to that symbol and its debt documentation.

What I ran

Reviewed head 8b472111c8cb451bff3b6ed5976abfc8f28e7802 using the prepared diff and repo_read.py reader. No tests or build commands were run. The author reports CTest and conventions passed at a different commit, 1a992b34c7.

Results

Check Result Note
Diff and changed code passed Callback and declaration inspected
Tests not run Author-reported results are from an earlier commit
Full changed-file review not run Two files were excluded by size

Findings

Blocking

None.

Non-blocking

None.

Not verified

Read core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp around the changed declaration and all of core/libs/prx/libSceNKWebKit/src/EmptyClients.cpp. The prepared diff was reviewed for core/libs/prx/libSceNKWebKit/Export.cpp and docs/dev/debt/libSceNKWebKit.md, but their full texts were excluded by size and not read. Console ABI behavior and tests on this exact head were not verified.

To get this to a good state

Nothing is required.

@alvaroelpob
alvaroelpob force-pushed the feat/nkwebkit-empty-window-policy-callback branch from 8b47211 to e49592a Compare November 22, 2026 06:21
@alvaroelpob

Copy link
Copy Markdown
Contributor Author

Rebased onto main (9eff0ca3b7) and dropped the maintainer merge of main. Main takes debt changes only through fragments now, so the entry moved to docs/dev/debt/changes/feat-nkwebkit-empty-window-policy-callback.md (e49592a). The old recount of the Older callable exports is left out: that line belongs to the pending codex-nkwebkit-isobox-allocation.md fragment, and debt_fold.py refuses a second fragment that changes the same entry. #16859 is merged, so Depends on is now none.

suite.py at e49592a: CTest 6573/6574 passed, conventions passed; guest_libressl_tls_engine_transport failed once and passed on rerun.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 22, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the implementation and debt entry support the stated no-op policy callback behavior.

What I ran

Reviewed head e49592a7c74a38dbc35bb887ebbf69d61b1875f3. Read the prepared description, commits, manifest and diff, plus the added implementation, changed declaration and relevant symbol references through repo_read.py. No commands or tests were run; the Linux test results in the PR description are author-reported.

Results

Check Result Note
Diff and targeted code review passed Behavior and declaration reviewed
Test suite not run Reported results are from the author

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of Export.cpp was excluded because it was too large; its diff hunk was reviewed. review/files.json was unavailable through the reader, so the reviewed-file inventory could not be confirmed. The remaining portion of LegacyExports.hpp, console ABI behavior, and the author-reported test run were not independently verified. Read: description.md, commits.md, manifest.json, diff.patch, EmptyClients.cpp, and lines 512–530 of LegacyExports.hpp. Excluded: full Export.cpp.

To get this to a good state

Nothing is required.

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current main already defines the new-window policy callback in NoOpExports.cpp and calls it in EmptyExports.cpp. Git merges this head cleanly, but compiling and linking the two merged objects fails with a duplicate dispatchDecidePolicyForNewWindowAction definition. Keep one definition if this branch still carries a change you need.

AI-assisted: yes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants