feat(libSceNKWebKit): implement the WTF grapheme cluster counts #23723
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23723"
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 Dark3581 on 2026-11-19T14:30:14Z.
What
Implements
WTF::numGraphemeClusters(StringView)andWTF::numCodeUnitsInGraphemeClusters(StringView, unsigned)in libSceNKWebKit. Both were throwing stubs inExport.cpp.NotImplemented_nid_no_patch. That case needs the ICU character break iterator, and the bundled ICU has no break rule data.std::invalid_argument, asCheckBufferdoes elsewhere in the library.StringViewis passed by value as the existing 16-byteNKWebKit::WtfAbi::StringView. Its copy constructor is user-provided only underCHECK_STRINGVIEW_LIFETIME.tools/pr_overlap.py --branchfailed closed on PR 23468 and PR 23475, which conflict withmain. I compared them by hand. Each edits a stub next to these inExport.cpp/InventoryExports.hpp(only context lines match), and--nameslists no open PR for either function.Tested
Windows 10 22H2, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, on
main713cc62069plus this commit.ctest -R "^(nkwebkit_|guest_nkwebkit)": 153 of 153 pass, including the newnkwebkit_graphemeclusters.\r\r\n,\n\r,\r\n\r\n) and embedded nulls;tools/check_conventions.py --base origin/main,tools/debt_fold.py --checkandtools/env_reference.py --checkpass.No title run: no title on hand reaches these functions.
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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T14:32:51Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3510ea7d5d:tools/check_conventions.pypassed.nkwebkit_graphemeclusters_testsbuilt cleanly.nkwebkit_graphemeclusters):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/GraphemeClusters.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me