feat(libSceNKWebKit): implement WebCore static value helpers (reduceTimeResolution, platformDefaultMediaSourceEnabled, scriptNameToCode) #19680

Merged
B-Howell merged 14 commits from upstream-pr/19680 into main 2026-11-18 06:39:31 +00:00
B-Howell commented 2026-11-13 19:45:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-11-13T19:45:43Z.


What

Implements three existing throwing libSceNKWebKit stubs from the pinned PS5 WebKit sources (neonmodder123/PS5-WebKit-11.x@80f77e94):

  • WebCore::ResourceLoadStatistics::reduceTimeResolution(WTF::WallTime): floors the seconds to the 5-second timestampResolution (ResourceLoadStatistics.cpp L38, L566-569). WallTime is one double, passed and returned in xmm0 (static_assert on its size and alignment).
  • WebCore::SettingsBase::platformDefaultMediaSourceEnabled(): returns true, the non-Cocoa ENABLE(MEDIA_SOURCE) body (SettingsBase.cpp L87-91).
  • WebCore::scriptNameToCode(const WTF::String&): the 106-entry ISO 15924 table of LocaleToScriptMapping.cpp L40-158, matched like PackedLettersLiteral in SortedArrayMap: exactly four ASCII characters, ASCII case-insensitive; anything else (including a null String and 16-bit non-ASCII) returns USCRIPT_INVALID_CODE. The UScriptCode values come from the existing 3rdparty/icu submodule's uscript.h (libSceNKWebKit now links icu_common privately for the header, as libharfbuzz does), not copied constants.

The declarations move from InventoryExports.hpp/LegacyExports.hpp to a typed WebCoreValueHelpersExports.hpp; the two inventory rows are removed from docs/dev/debt/libSceNKWebKit.md and a debt entry records that console behaviour is unverified. SQLiteFileSystem::computeHashForFileName is left for after #19330 (PAL::CryptoDigest) so this PR has no dependency.

tools/progress.py libraries done: 15750 -> 15753 (+3).

Tested

Linux (WSL2 Ubuntu, clang, Release), new nkwebkit_webcorevaluehelpers test:

  • Red control (the three bodies replaced with NotImplemented_nid_no_patch, as on main): 0% tests passed, 1 tests failed out of 1 (_ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE not implemented).
  • With this change: ctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3 passed 3/3.
  • Cases: reduceTimeResolution 12 -> 10, 15 -> 15, -1 -> -5, 0 -> 0, 4.999 -> 0, 1700000003.75 -> 1700000000, inf -> inf, NaN -> NaN; platformDefaultMediaSourceEnabled -> true; scriptNameToCode arab/ARAB -> 2, Cyrl -> 8, latn -> 25, hani -> 17, hans -> 73, kore -> 18, Hira/jpan -> 54, qaai -> 1, zyyy -> 0, zxxx -> 102, zzzz -> 103, 16-bit LaTn -> 25; abc, arabx, empty, ar@b, zinh, 16-bit \u0161rab, arab\0, ar\0b and a null String -> -1.
  • ctest -R '^public_headers': 65/65 passed (the new header is in the manifest).
  • On 7d58eaeaf85: WebCoreValueHelpers.cpp used std::begin/std::end on the script table without <iterator>; GCC 13 and 15 libstdc++ do not declare them through <algorithm> (PrivacyOnion's report). Added #include <iterator>. Windows 11, WinLibs GCC 15.2.0, Release: red, previous head: the same five no matching function for call to 'begin(const std::pair<unsigned int, UScriptCode> [106])' errors; green, this head: nkwebkit_webcorevaluehelpers_tests builds and ctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3 passes. Conventions passed.
  • On 803a87173d2, an ordinary merge of main at e90cbbc086f: an include-line conflict in libSceNKWebKit.hpp with #19300 (VP codec), resolved by keeping both. Rebuilt on WSL Ubuntu, GCC, Release: nkwebkit_webcorevaluehelpers and #19300's nkwebkit_vpcodec passed. Conventions passed.
  • @JJenkx, Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, 803a87173d merged onto main 752c0f776b (report): nkwebkit_webcorevaluehelpers passed 3/3, none skipped.
  • 2026-11-14: comment-only commit 385399cb99b rewrites each Derived from line as Derived from <path>@<40-character revision>, one line per source file (maintainer ruling, #19819 comment). No code changed, so no rebuild; tools/check_conventions.py --base origin/main passes and git diff --check is clean.
  • Main merge e3cb7746dfa: Windows 11, WinLibs GCC 15.2, Release, all 18 of our main merges from this round built together on main 790e9a371cc: ctest -R nkwebkit 116/116 passed, patched_libraries passed once the #19822 fix was in. Re-merged onto b9fb5ab5a32 (no NKWebKit changes in between); check_conventions passed.
  • Debt fragment ca7aee7242: merged main c3d38470e0c and moved this PR's debt edits into docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head. debt_fold.py --check and check_conventions.py --base origin/main pass. Documentation only, no build.
  • Main merge 1cd592e0f8e: ordinary merge of main cf058cf14bc. A libSceNKWebKit/CMakeLists.txt conflict with the libpsl link from #20516, resolved by keeping both (icu_common plus psl). WSL2 Ubuntu, Release: nkwebkit_webcorevaluehelpers_tests built, ctest -R ^nkwebkit_webcorevaluehelpers$ passed 1/1. The debt files match main; debt_fold.py --check and check_conventions.py --base origin/main pass.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5301813117 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680). Originally posted by [B-Howell](https://github.com/B-Howell) on 2026-11-13T19:45:43Z. --- ### What Implements three existing throwing `libSceNKWebKit` stubs from the pinned PS5 WebKit sources ([neonmodder123/PS5-WebKit-11.x@80f77e94](https://github.com/neonmodder123/PS5-WebKit-11.x/tree/80f77e94c63ee7202eec3d4b5b1a021dd89011ba)): - `WebCore::ResourceLoadStatistics::reduceTimeResolution(WTF::WallTime)`: floors the seconds to the 5-second `timestampResolution` ([ResourceLoadStatistics.cpp L38, L566-569](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/loader/ResourceLoadStatistics.cpp#L566-L569)). `WallTime` is one `double`, passed and returned in `xmm0` (`static_assert` on its size and alignment). - `WebCore::SettingsBase::platformDefaultMediaSourceEnabled()`: returns `true`, the non-Cocoa `ENABLE(MEDIA_SOURCE)` body ([SettingsBase.cpp L87-91](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/page/SettingsBase.cpp#L87-L91)). - `WebCore::scriptNameToCode(const WTF::String&)`: the 106-entry ISO 15924 table of [LocaleToScriptMapping.cpp L40-158](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/platform/text/LocaleToScriptMapping.cpp#L40-L158), matched like `PackedLettersLiteral` in `SortedArrayMap`: exactly four ASCII characters, ASCII case-insensitive; anything else (including a null `String` and 16-bit non-ASCII) returns `USCRIPT_INVALID_CODE`. The `UScriptCode` values come from the existing `3rdparty/icu` submodule's `uscript.h` (`libSceNKWebKit` now links `icu_common` privately for the header, as `libharfbuzz` does), not copied constants. The declarations move from `InventoryExports.hpp`/`LegacyExports.hpp` to a typed `WebCoreValueHelpersExports.hpp`; the two inventory rows are removed from `docs/dev/debt/libSceNKWebKit.md` and a debt entry records that console behaviour is unverified. `SQLiteFileSystem::computeHashForFileName` is left for after #19330 (`PAL::CryptoDigest`) so this PR has no dependency. `tools/progress.py` libraries done: 15750 -> 15753 (+3). ### Tested Linux (WSL2 Ubuntu, clang, Release), new `nkwebkit_webcorevaluehelpers` test: - Red control (the three bodies replaced with `NotImplemented_nid_no_patch`, as on `main`): `0% tests passed, 1 tests failed out of 1` (`_ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE not implemented`). - With this change: `ctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3` passed 3/3. - Cases: `reduceTimeResolution` 12 -> 10, 15 -> 15, -1 -> -5, 0 -> 0, 4.999 -> 0, 1700000003.75 -> 1700000000, inf -> inf, NaN -> NaN; `platformDefaultMediaSourceEnabled` -> true; `scriptNameToCode` `arab`/`ARAB` -> 2, `Cyrl` -> 8, `latn` -> 25, `hani` -> 17, `hans` -> 73, `kore` -> 18, `Hira`/`jpan` -> 54, `qaai` -> 1, `zyyy` -> 0, `zxxx` -> 102, `zzzz` -> 103, 16-bit `LaTn` -> 25; `abc`, `arabx`, empty, `ar@b`, `zinh`, 16-bit `\u0161rab`, `arab\0`, `ar\0b` and a null `String` -> -1. - `ctest -R '^public_headers'`: 65/65 passed (the new header is in the manifest). - On `7d58eaeaf85`: `WebCoreValueHelpers.cpp` used `std::begin`/`std::end` on the script table without `<iterator>`; GCC 13 and 15 libstdc++ do not declare them through `<algorithm>` (PrivacyOnion's report). Added `#include <iterator>`. Windows 11, WinLibs GCC 15.2.0, Release: red, previous head: the same five `no matching function for call to 'begin(const std::pair<unsigned int, UScriptCode> [106])'` errors; green, this head: `nkwebkit_webcorevaluehelpers_tests` builds and `ctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3` passes. Conventions passed. - On `803a87173d2`, an ordinary merge of `main` at `e90cbbc086f`: an include-line conflict in `libSceNKWebKit.hpp` with #19300 (VP codec), resolved by keeping both. Rebuilt on WSL Ubuntu, GCC, Release: `nkwebkit_webcorevaluehelpers` and #19300's `nkwebkit_vpcodec` passed. Conventions passed. - @JJenkx, Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, 803a87173d merged onto main 752c0f776b ([report](https://github.com/boykopovar/AnyPS5/pull/19680#issuecomment-6866654754)): `nkwebkit_webcorevaluehelpers` passed 3/3, none skipped. - 2026-11-14: comment-only commit `385399cb99b` rewrites each `Derived from` line as `Derived from <path>@<40-character revision>`, one line per source file (maintainer ruling, [#19819 comment](https://github.com/boykopovar/AnyPS5/pull/19819#issuecomment-6868889186)). No code changed, so no rebuild; `tools/check_conventions.py --base origin/main` passes and `git diff --check` is clean. - Main merge `e3cb7746dfa`: Windows 11, WinLibs GCC 15.2, Release, all 18 of our main merges from this round built together on main `790e9a371cc`: `ctest -R nkwebkit` 116/116 passed, `patched_libraries` passed once the #19822 fix was in. Re-merged onto `b9fb5ab5a32` (no NKWebKit changes in between); `check_conventions` passed. - Debt fragment `ca7aee7242`: merged main `c3d38470e0c` and moved this PR's debt edits into `docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md`; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head. `debt_fold.py --check` and `check_conventions.py --base origin/main` pass. Documentation only, no build. - Main merge `1cd592e0f8e`: ordinary merge of `main` `cf058cf14bc`. A `libSceNKWebKit/CMakeLists.txt` conflict with the libpsl link from #20516, resolved by keeping both (`icu_common` plus `psl`). WSL2 Ubuntu, Release: `nkwebkit_webcorevaluehelpers_tests` built, `ctest -R ^nkwebkit_webcorevaluehelpers$` passed 1/1. The debt files match `main`; `debt_fold.py --check` and `check_conventions.py --base origin/main` pass. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-13 19:47:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T19:47:59Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 8cb711469f:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests failed to build.
    core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:163:40: error: no matching function for call to ‘begin(const std::pair<unsigned int, UScriptCode> [106])’
    core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:163:67: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’
    /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
    core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:198:45: error: no matching function for call to ‘begin(const std::pair<unsigned int, UScriptCode> [106])’
    /usr/include/c++/13/initializer_list:88:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
    core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:198:72: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’
    /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
    core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:199:26: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’
    /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
    
  • Minor: please drop the Generated with footer from the description; the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5897071346 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5897071346). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-13T19:47:59Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `8cb711469f`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` failed to build. ``` core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:163:40: error: no matching function for call to ‘begin(const std::pair<unsigned int, UScriptCode> [106])’ core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:163:67: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’ /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’ core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:198:45: error: no matching function for call to ‘begin(const std::pair<unsigned int, UScriptCode> [106])’ /usr/include/c++/13/initializer_list:88:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’ core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:198:72: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’ /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’ core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp:199:26: error: no matching function for call to ‘end(const std::pair<unsigned int, UScriptCode> [106])’ /usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’ ``` - Minor: please drop the `Generated with` footer from the description; the AI-assisted checkbox can stay. Requesting changes for the points above.
PrivacyOnion commented 2026-11-14 04:51:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T04:51:49Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 15c430a557:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #3923: nkwebkit_webcorevaluehelpers .....   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • WebCoreValueHelpers.cpp:242: Verified WebCore::ResourceLoadStatistics::reduceTimeResolution correctly floors timestamps to 5.0-second granularity via std::floor(time.m_value / 5.0) * 5.0, accurately preserving behavior for positive, negative, zero, infinity, and NaN inputs.
    • WebCoreValueHelpers.cpp:246: Verified WebCore::SettingsBase::platformDefaultMediaSourceEnabled accurately returns true matching the non-Cocoa WebCore configuration and PS5 pinned source tree.
    • WebCoreValueHelpers.cpp:223-255: Verified WebCore::scriptNameToCode and PackFolded safely handle null WTF::String, empty strings, lengths < 4 and > 4, non-ASCII characters (>= 0x80), and 8-bit/16-bit encodings, consistently returning USCRIPT_INVALID_CODE (-1) on invalid inputs without out-of-bounds memory access.
    • WebCoreValueHelpers.cpp:106-218: Verified all 106 ScriptNameCodes entries match ICU UScriptCode constants and are validated as strictly sorted at compile-time via std::is_sorted for exact binary search lookup using std::lower_bound.
    • WebCoreValueHelpersExports.hpp:9-11: Verified WTF::WallTime size (8 bytes), alignment (8 bytes), trivial copyability, and APS5_VABI export calling conventions for cross-platform LP64 (Linux) and LLP64 (Windows) ABI stability.
    • tests/WebCoreValueHelpers.cpp:46-107: Verified comprehensive test coverage exercising valid script codes across uppercase/lowercase/mixed-case, 8-bit and 16-bit strings, sub-step timestamps, embedded nulls, null StringImpl, and StringImpl refCount preservation.
    • AGENTS.md and dev conventions: Verified verbatim Apple and Google license notices conform to maintainer oneandonlydean's directive, no illegal comments exist, and debt tracking is properly updated in docs/dev/debt/libSceNKWebKit.md.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5901743263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5901743263). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T04:51:49Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `15c430a557`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #3923: nkwebkit_webcorevaluehelpers ..... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - WebCoreValueHelpers.cpp:242: Verified WebCore::ResourceLoadStatistics::reduceTimeResolution correctly floors timestamps to 5.0-second granularity via std::floor(time.m_value / 5.0) * 5.0, accurately preserving behavior for positive, negative, zero, infinity, and NaN inputs. - WebCoreValueHelpers.cpp:246: Verified WebCore::SettingsBase::platformDefaultMediaSourceEnabled accurately returns true matching the non-Cocoa WebCore configuration and PS5 pinned source tree. - WebCoreValueHelpers.cpp:223-255: Verified WebCore::scriptNameToCode and PackFolded safely handle null WTF::String, empty strings, lengths < 4 and > 4, non-ASCII characters (>= 0x80), and 8-bit/16-bit encodings, consistently returning USCRIPT_INVALID_CODE (-1) on invalid inputs without out-of-bounds memory access. - WebCoreValueHelpers.cpp:106-218: Verified all 106 ScriptNameCodes entries match ICU UScriptCode constants and are validated as strictly sorted at compile-time via std::is_sorted for exact binary search lookup using std::lower_bound. - WebCoreValueHelpersExports.hpp:9-11: Verified WTF::WallTime size (8 bytes), alignment (8 bytes), trivial copyability, and APS5_VABI export calling conventions for cross-platform LP64 (Linux) and LLP64 (Windows) ABI stability. - tests/WebCoreValueHelpers.cpp:46-107: Verified comprehensive test coverage exercising valid script codes across uppercase/lowercase/mixed-case, 8-bit and 16-bit strings, sub-step timestamps, embedded nulls, null StringImpl, and StringImpl refCount preservation. - AGENTS.md and dev conventions: Verified verbatim Apple and Google license notices conform to maintainer oneandonlydean's directive, no illegal comments exist, and debt tracking is properly updated in docs/dev/debt/libSceNKWebKit.md. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-14 23:54:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T23:54:20Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 1c3a6dfb4b:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #4086: nkwebkit_webcorevaluehelpers .....   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified WebCore::ResourceLoadStatistics::reduceTimeResolution in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp correctly floors time values using std::floor and the 5.0-second timestamp resolution across positive, negative (-1.0 -> -5.0), zero, boundary (4.999 -> 0.0), large timestamps, infinity, and NaN values.
    • Verified WebCore::SettingsBase::platformDefaultMediaSourceEnabled in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true, matching upstream non-Cocoa WebCore behavior.
    • Verified WebCore::scriptNameToCode in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp against all 106 ISO 15924 script codes in ScriptNameCodes, verifying compile-time ordering via std::is_sorted, binary search lookup via std::lower_bound, and ASCII case folding via (code | 0x20).
    • Verified input validation in PackFolded and scriptNameToCode handling null String (scriptName.impl == nullptr), 8-bit and 16-bit encodings, lengths != 4, embedded null characters, non-ASCII characters (code >= 0x80), and unknown scripts, returning USCRIPT_INVALID_CODE (-1) without buffer overruns or null dereferences.
    • Verified ABI conformity in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp including APS5_VABI calling conventions, type sizes (sizeof(WTF::WallTime) == 8, std::int32_t for UScriptCode), and clean removal of old stubs from Export.cpp, InventoryExports.hpp, and LegacyExports.hpp.
    • Verified AGENTS.md compliance, including exact maintainer-approved upstream copyright and license notices, absence of unauthorized comments in code, technical debt documentation in docs/dev/debt/libSceNKWebKit.md, and thorough test assertions in core/libs/prx/libSceNKWebKit/tests/WebCoreValueHelpers.cpp.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5907978364 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5907978364). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T23:54:20Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `1c3a6dfb4b`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #4086: nkwebkit_webcorevaluehelpers ..... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified WebCore::ResourceLoadStatistics::reduceTimeResolution in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp correctly floors time values using std::floor and the 5.0-second timestamp resolution across positive, negative (-1.0 -> -5.0), zero, boundary (4.999 -> 0.0), large timestamps, infinity, and NaN values. - Verified WebCore::SettingsBase::platformDefaultMediaSourceEnabled in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true, matching upstream non-Cocoa WebCore behavior. - Verified WebCore::scriptNameToCode in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp against all 106 ISO 15924 script codes in ScriptNameCodes, verifying compile-time ordering via std::is_sorted, binary search lookup via std::lower_bound, and ASCII case folding via (code | 0x20). - Verified input validation in PackFolded and scriptNameToCode handling null String (scriptName.impl == nullptr), 8-bit and 16-bit encodings, lengths != 4, embedded null characters, non-ASCII characters (code >= 0x80), and unknown scripts, returning USCRIPT_INVALID_CODE (-1) without buffer overruns or null dereferences. - Verified ABI conformity in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp including APS5_VABI calling conventions, type sizes (sizeof(WTF::WallTime) == 8, std::int32_t for UScriptCode), and clean removal of old stubs from Export.cpp, InventoryExports.hpp, and LegacyExports.hpp. - Verified AGENTS.md compliance, including exact maintainer-approved upstream copyright and license notices, absence of unauthorized comments in code, technical debt documentation in docs/dev/debt/libSceNKWebKit.md, and thorough test assertions in core/libs/prx/libSceNKWebKit/tests/WebCoreValueHelpers.cpp. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 04:36:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T04:36:37Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 1d1add1f29:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #4112: nkwebkit_webcorevaluehelpers .....   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, correctly handling negative timestamps (-1.0 -> -5.0), boundary values (4.999 -> 0.0), infinity, and NaN in IEEE 754 precision.
    • Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation.
    • Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl, 8-bit (Is8BitFlag = 4) and 16-bit storage, lengths != 4, and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access.
    • Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time and queried via std::lower_bound with matching comparator semantics.
    • Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability.
    • Verified AGENTS.md compliance: code comments are restricted to maintainer-approved upstream notices, no title-specific special-casing exists, and technical debt documentation is correctly updated in docs/dev/debt/libSceNKWebKit.md.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5909088898 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5909088898). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T04:36:37Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `1d1add1f29`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #4112: nkwebkit_webcorevaluehelpers ..... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, correctly handling negative timestamps (-1.0 -> -5.0), boundary values (4.999 -> 0.0), infinity, and NaN in IEEE 754 precision. - Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation. - Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl, 8-bit (Is8BitFlag = 4) and 16-bit storage, lengths != 4, and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access. - Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time and queried via std::lower_bound with matching comparator semantics. - Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability. - Verified AGENTS.md compliance: code comments are restricted to maintainer-approved upstream notices, no title-specific special-casing exists, and technical debt documentation is correctly updated in docs/dev/debt/libSceNKWebKit.md. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 21:27:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:27:39Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against e3cb7746df:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #4266: nkwebkit_webcorevaluehelpers .....   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, handling negative timestamps, boundary values, infinity, and NaN in IEEE 754 precision.
    • Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation.
    • Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl (packed remains 0, missing the sorted table and returning USCRIPT_INVALID_CODE), 8-bit and 16-bit storage, lengths > 4, lengths < 4 (lower byte(s) remain 0x00, missing the 4-letter ASCII table), and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access.
    • Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time via static_assert and queried via std::lower_bound with matching comparator semantics.
    • Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability.
    • Verified AGENTS.md compliance: code comments are restricted to maintainer-requested upstream license notices, no title-specific special-casing exists, and technical debt documentation is updated in docs/dev/debt/libSceNKWebKit.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5913011712 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5913011712). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T21:27:39Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e3cb7746df`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #4266: nkwebkit_webcorevaluehelpers ..... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, handling negative timestamps, boundary values, infinity, and NaN in IEEE 754 precision. - Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation. - Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl (packed remains 0, missing the sorted table and returning USCRIPT_INVALID_CODE), 8-bit and 16-bit storage, lengths > 4, lengths < 4 (lower byte(s) remain 0x00, missing the 4-letter ASCII table), and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access. - Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time via static_assert and queried via std::lower_bound with matching comparator semantics. - Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability. - Verified AGENTS.md compliance: code comments are restricted to maintainer-requested upstream license notices, no title-specific special-casing exists, and technical debt documentation is updated in docs/dev/debt/libSceNKWebKit.md. Looks Good To Me
PrivacyOnion commented 2026-11-15 23:32:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T23:32:57Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ca7aee7242:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #4269: nkwebkit_webcorevaluehelpers .....   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, handling negative timestamps, boundary values, infinity, and NaN in IEEE 754 precision.
    • Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation.
    • Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl (packed remains 0, missing the sorted table and returning USCRIPT_INVALID_CODE), 8-bit and 16-bit storage, lengths > 4, lengths < 4 (lower byte(s) remain 0, which never match the 4-letter table), and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access.
    • Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time via static_assert and queried via std::lower_bound with matching comparator semantics.
    • Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability.
    • Verified AGENTS.md compliance: code comments are restricted to maintainer-requested upstream license notices, no title-specific special-casing exists, and technical debt documentation is updated via fragment in docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5913508440 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5913508440). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T23:32:57Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `ca7aee7242`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #4269: nkwebkit_webcorevaluehelpers ..... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp accurately computes std::floor(time.m_value / 5.0) * 5.0, handling negative timestamps, boundary values, infinity, and NaN in IEEE 754 precision. - Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream WebCore non-Cocoa SettingsBase implementation. - Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely handles null scriptName.impl (packed remains 0, missing the sorted table and returning USCRIPT_INVALID_CODE), 8-bit and 16-bit storage, lengths > 4, lengths < 4 (lower byte(s) remain 0, which never match the 4-letter table), and non-ASCII characters (code >= 0x80), returning USCRIPT_INVALID_CODE (-1) on invalid inputs without null dereference or out-of-bounds access. - Verified the 106-entry ScriptNameCodes table in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp is verified sorted at compile time via static_assert and queried via std::lower_bound with matching comparator semantics. - Verified calling conventions and type definitions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp, ensuring APS5_VABI and static_assert verification on sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, and trivial copyability. - Verified AGENTS.md compliance: code comments are restricted to maintainer-requested upstream license notices, no title-specific special-casing exists, and technical debt documentation is updated via fragment in docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md. Looks Good To Me
PrivacyOnion commented 2026-11-16 02:03:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T02:03:35Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 1cd592e0f8:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_webcorevaluehelpers_tests built cleanly.
  • CTest (nkwebkit_webcorevaluehelpers):
    1/1 Test #4276: nkwebkit_webcorevaluehelpers .....   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp floors WTF::WallTime::m_value to 5.0-second multiples via std::floor(time.m_value / TimestampResolution) * TimestampResolution.
    • Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream non-Cocoa SettingsBase.cpp.
    • Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely checks scriptName.impl for nullptr, handles 8-bit and 16-bit buffers, rejects lengths > 4 and non-ASCII characters (>= 0x80), ASCII-folds characters via | 0x20, and searches the compile-time sorted 106-entry ScriptNameCodes table with std::lower_bound, returning USCRIPT_INVALID_CODE on misses or short strings.
    • Verified ABI declarations and static assertions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp (APS5_VABI, sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, std::is_trivially_copyable_vWTF::WallTime) and removal of the three throwing stubs from Export.cpp, InventoryExports.hpp, and LegacyExports.hpp.
    • Verified AGENTS.md compliance, upstream copyright notices in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp, and technical debt fragment in docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5914245565 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19680#pullrequestreview-5914245565). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-16T02:03:35Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `1cd592e0f8`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_webcorevaluehelpers_tests` built cleanly. - **CTest** (`nkwebkit_webcorevaluehelpers`): ``` 1/1 Test #4276: nkwebkit_webcorevaluehelpers ..... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified _ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp floors WTF::WallTime::m_value to 5.0-second multiples via std::floor(time.m_value / TimestampResolution) * TimestampResolution. - Verified _ZN7WebCore12SettingsBase33platformDefaultMediaSourceEnabledEv in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp returns true matching upstream non-Cocoa SettingsBase.cpp. - Verified _ZN7WebCore16scriptNameToCodeERKN3WTF6StringE in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp safely checks scriptName.impl for nullptr, handles 8-bit and 16-bit buffers, rejects lengths > 4 and non-ASCII characters (>= 0x80), ASCII-folds characters via | 0x20, and searches the compile-time sorted 106-entry ScriptNameCodes table with std::lower_bound, returning USCRIPT_INVALID_CODE on misses or short strings. - Verified ABI declarations and static assertions in core/libs/prx/libSceNKWebKit/include/WebCoreValueHelpersExports.hpp (APS5_VABI, sizeof(WTF::WallTime) == 8, alignof(WTF::WallTime) == 8, std::is_trivially_copyable_v<WTF::WallTime>) and removal of the three throwing stubs from Export.cpp, InventoryExports.hpp, and LegacyExports.hpp. - Verified AGENTS.md compliance, upstream copyright notices in core/libs/prx/libSceNKWebKit/src/WebCoreValueHelpers.cpp, and technical debt fragment in docs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md. Looks Good To Me
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!19680
No description provided.