feat(libSceNKWebKit): implement WKSerializedScriptValue creation and deserialization helpers #15843
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15843"
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 heditrigui on 2026-11-04T18:53:35Z.
What
Implements
WKSerializedScriptValueCreateandWKSerializedScriptValueDeserializeinlibSceNKWebKit(core/libs/prx/libSceNKWebKit/src/SerializedScriptValue.cpp):WKSerializedScriptValueCreatebridging JavaScriptCore values into serialized values using QuickJS JSON stringification (JSValueCreateJSONString), with explicit preservation forundefined,NaN,+Infinityand-Infinity.WKSerializedScriptValueDeserializerestoring serialized values back toJSValueRefin the target execution context (JSValueMakeFromJSONString), setting*exceptionto an Error object if deserialization fails and an exception pointer is supplied.NKWebKit::ObjectOf<NKWebKit::ObjectType::SerializedScriptValue>, enabling standard WebKit C API reference counting (WKRetain,WKRelease) and runtime type identification (WKGetTypeID, returning 20).Export.cppand declarations inInventoryExports.hpp, declaring C API inWebKitValueExports.hpp.docs/dev/debt/libSceNKWebKit.mdfrom 6046 to 6044 and documents JSON representation and exception semantics in the functional technical debt section.Tested
core/libs/prx/libSceNKWebKit/tests/Base.cpp(TestSerializedScriptValue):WKSerializedScriptValueGetTypeID).WKRetainandWKRelease.*exceptionpopulated on deserialization failure with invalid JSON.python tools/check_conventions.py --base upstream/main(0 errors).python core/libs/tests/test_public_headers.py --audit-only(407 libraries, 33,856 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)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-09T18:54:50Z.
Review: CHANGES_REQUESTED
Thanks for the work. Blocking items:
core/libs/prx/libSceNKWebKit/tests/Base.cppcontains the whole file twice: theusing WKPoint/Check/Require/TestTypeIDs/mainblock appears at lines 24-1752 and again at 1805-3546, so it does not compile (redefinitions, twomain). It comes from the merge-of-main commits. Please restoreBase.cppfrommainand re-add onlyTestSerializedScriptValue, its call inmainand theWKSerializedScriptValueGetTypeID() == 20check.maininExport.cpp,InventoryExports.hppanddocs/dev/debt/libSceNKWebKit.md. Please rebase ontomain(a clean rebase instead of the repeated merge commits would also help).WKSerializedScriptValueDeserializeignoresexceptionand the debt line says failures are reported; either set*exceptionwhenJSValueMakeFromJSONStringfails or reword the line.windowscheck is red on this head; please check it after the rebase.The implementation in
SerializedScriptValue.cpplooks fine otherwise.