feat(libSceNKWebKit): implement WTF external strings #14920
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14920"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by w4rc0n on 2026-11-02T01:31:48Z.
What
WTF::ExternalStringImpl::createwas aNotImplementedstub in both its 8-bit and 16-bit forms. The destruction from #14917, and the atom and symbol paths from #14918 and #14919, also threw for external buffers. WebKit wraps buffers it doesn't own this way, so those paths stopped. Both exports now follow the pinned PS5 WebKit 11.x source:ExternalStringImpl.cpp:31-55. The string keeps the caller's characters without copying them and marks themBufferExternal. It takes ownership of the caller'sWTF::Functionfree function, a single pointer that is set to null in the caller.Function<void(ExternalStringImpl*, void*, unsigned)>(ExternalStringImpl.h:35). Its wrapper and vtable belong to the guest.call, slot 1 is the deleting destructor (Function.h:37-103).APS5_VABIfunction pointers.StringImpl.cpp:140-145:sizeInBytes()(the 24-byte header plus length times character width, narrowed tounsigned);ExternalStringImplis 32 bytes, with the free function at offset 24, pinned withstatic_assert.Registered symbols stay unsupported.
Adapted source: none in this PR's own code. Its change to
AddAtomapplies insrc/WtfAtoms.cpp, where #14918's adapted code now is.tools/pr_overlap.pyon this head, withmainat0eba5db30d: no other open PR changes these exports or adds the same files. For the PRs it couldn't compare because they no longer merge withmain, GitHub's file lists show none of them changing these exports either. #13992, #14172, #14607, #15214, #15241 and #15867 change nearby lines in the same files; whichever merges later keeps both sides. The only exports it shares are with #14917, #14918 and #14919, in the same stack.Tested
Debian 12, GCC 12.2, Linux 6.18, Release, at the head
3325e018c976b038901ce384414a5aaad2a73eab, with no local changes. It is on #14919's head911bcec53185ff3d6d24d11b08789048bfbaa8c2.guest_nkwebkit_dates,guest_nkwebkit_numbers,nkwebkit_base,nkwebkit_config,nkwebkit_constants,nkwebkit_fastbitvector,nkwebkit_jsc,nkwebkit_palsessionid,nkwebkit_preferences,nkwebkit_resourceresponse,nkwebkit_webcoregeometry,nkwebkit_wtf,guest_nkwebkit_urlsandpublic_headerspass.nkwebkit_wtfcases use a guest-style wrapper with its own vtable. They cover:tools/progress.py: both exports count as implemented (libSceNKWebKit 1334, against 1332 with #14919).tools/check_conventions.pypasses.9d1e021975e6ecbdaf395584d055bc9653d825d2. It is AnyPS5'sBuildworkflow, dispatched in the author's fork withselect=true: the branch merged intomainatb11c7bf84f5d2f636ff60166cc3371bd071e24d5, built onwindows-latestwith WinLibs GCC 15.2 (MinGW-w64, UCRT). All 1390 selected tests passed, none skipped, including the twelve NKWebKit tests,public_headersandpatched_libraries. The run started before the fork had a test graph for thismain, so it selected more tests than usual. A fork-internal pull request existed only to give the workflow a number. The rebase ontomainat0eba5db30d8a3d03789e52e5c1a9ff853e4e33e4after #15911 changed onlydocs/dev/debt/libSceNKWebKit.md, sogit range-diffshows the code and tests under test are the same as at that run.Not built or run: macOS. No title or homebrew was run.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Pull request closed