feat(libSceNKWebKit): implement WTF::StringImpl::utf8ForCharacters and FileSystemImpl::makeAllDirectories #21270
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21270"
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 Harnoor6693 on 2026-11-16T04:04:57Z.
What
Implements three
libSceNKWebKitWTF exports that wereNotImplementedstubs:WTF::StringImpl::utf8ForCharactersfor 16-bit characters (takes theConversionMode: lenient, strict, replacing) and for 8-bit Latin-1 characters. Both reuse the conversion behindStringImpl::utf8. A null buffer with a nonzero length throws; length 0 gives an emptyCString.WTF::FileSystemImpl::makeAllDirectories: creates each missing component through the gueststatandmkdirwith mode 0700, returns true when the path already exists (including a file), and returns false for a blocked component, a nullStringor an empty one.The debt fragment adds both entries as Functional (not compared with a console module; the 0700 mode and the blocked-component result are unmeasured) and removes the three stubs. Layout and behaviour follow pinned WebKit sources; no code was copied.
Tested
BUILD_TESTINGbuild, rebased on1136efb901):ctest -R '^nkwebkit_wtf$'1 of 1 passed.4fc3ae8ef6. WithmakeAllDirectoriesmade to return false the test aborts, so the new assertions catch a broken implementation. Theutf8ForCharactersmutation check was run before the final rebase; the rebase only merged this PR's test block with two tests added totests/Wtf.cpponmain.python3 tools/check_conventions.py --base origin/mainandpython3 tools/debt_fold.py --checkpass.pr_overlap --branchfails closed (24 PRs touchExport.cpporInventoryExports.hppand could not be compared). I read each PR's diff: none adds or removes these three exports.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)🤖 Generated with Claude Code
https://claude.ai/code/session_01R6jSFCT3dGPkYpnJPNnPak
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T04:13:09Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
4fc3ae8ef6:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_wtf_testsbuilt cleanly.nkwebkit_wtf):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfSystem.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T04:36:42Z.
Review: COMMENTED
Reviewed — comments
Changes implement the requested WTF string conversion and directory creation exports; I found one behavior to confirm or adjust before treating the review as complete.
What I ran
4fc3ae8ef65807b55fa124224752a2d759c46ed2throughrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
makeAllDirectoriesreturns true for any existing path, including a regular file (WtfSystem.cpp:117). This matches the PR description but differs from the conventional meaning of “make directories” and may differ from callers’ expectations. Please confirm this is intentional against the relevant WebKit contract, or restrict the success case to directories. The review bundle includes tests that encode the current behavior, but no console comparison.Not verified
WtfExports.hpp,WtfString.cpp,WtfSystem.cpp,tests/Wtf.cpp,review/description.md,review/commits.md,review/manifest.json, andreview/diff.patch.Export.cppandinclude/InventoryExports.hpp(too large for the review folder). Their changed hunks were visible indiff.patch; other contents were not read.files.jsonwas not available in the reader listing, so its reviewed/excluded inventory was not verified.To get this to a good state
Nothing is required. Optional: confirm the existing-file success behavior against the intended API contract.