feat(libSceNKWebKit): recognize JavaScript and HTTP-family URL schemes #13772
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13772"
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 hyvvs on 2026-10-31T05:16:39Z.
What
Implement two
libSceNKWebKitexports with matching by-valueWTF::StringViewABI and complete scalar, allocation-free behavior from Sony PS5 WebKit 11.xSource/WTF/wtf/URL.cpp:WTF::protocolIsJavaScript(StringView): case-insensitivejavascript:scheme; trim leading C0 controls/spaces, skip internal TAB/CR/LF during the scheme check, and reject incomplete, malformed or non-ASCII schemes.WTF::protocolIsInHTTPFamily(StringView): case-insensitivehttp:/https:prefix at offset 0, without parsing or constructing a URL.The 16-byte LP64
StringViewhas pointer at offset 0, unsigned length at offset 8 and 8-bit flag at offset 12. Both take it by value and returnbool; no guest allocation or ownership is introduced. The two throwing stubs are removed, API declarations corrected, and a separate CMake regression target covers 8-bit/UTF-16 strings, prefix and suffix handling, controls, mixed case, explicit lengths and null/invalid pointers. All 8,851 other exports are unchanged. Progress: 11 -> 13 implemented of 8,853 (+2).Tested
-std=c++20 -O1 -g -Wall -Wextra -Werror -fsanitize=address,undefined: new regression executable passes, including invalid-null handling, no sanitizer findings.-std=c++20 -O0 -Wall -Wextra -Werror -static: native regression executable passes for all valid cases; invalid-null exception-catch test stays Linux-only because MinGW standalone SEH cannot unwind a thrown exception acrossAPS5_VABI(recorded in debt).-fsyntax-onlyfor implementation and test: pass.python -m unittest discover -s tools/tests -p test_progress.py -q: 56 tests pass.python tools/progress.py --module libSceNKWebKit: 13/8853 implemented, +2 over this branch's base.git diff --check: pass; new files are UTF-8 without BOM.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T06:23:49Z.
Review: COMMENTED
Linux run of head
5da95d33aa, merged (--no-commit) ontomain6a691f69ee. Ubuntu 26.04 (kernel 7.0), GCC 15.2.0, CMake 4.2.3, Ninja, Release,BUILD_TESTING=ON, i7-8700.guest_nkwebkit_url_protocols: passes 3/3.nkwebkit: 3/3.public_headers: 65/65.#ifndef _WIN32InvalidArguments()block, which the description says only runs on Linux, does run here and passes: the null-data/non-zero-length cases are caught asstd::invalid_argumentacrossAPS5_VABI. With theValidatethrow changed to a plainreturn, the test crashes (SEGFAULT) 3/3, so that block protects the check.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Pull request closed