feat(libSceNKWebKit): implement WKBundleNodeHandle document and frame getters #18094
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18094"
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 adriaespii on 2026-11-10T11:35:54Z.
What
Implement WKBundleNodeHandleCopyDocument, WKBundleNodeHandleCopyDocumentFrame and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame in libSceNKWebKit.
Tested
Unit tests in core/libs/prx/libSceNKWebKit/tests/Base.cpp.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-10T13:04:21Z.
Review: DISMISSED
Windows CI check of head
612b4e6249(run 42811120332, job 129812561229) failed becausenkwebkit_base_testsdoes not compile:Analysis
NKWebKit::Releasedoes not exist. C-style WebKit objects returned by copy getters must be released usingWKRelease(copiedDoc).RequireThrowsis not defined intests/Base.cpp. The standard pattern inBase.cppis: Note thatNKWebKit::Castthrowsstd::invalid_argument, socatch (const std::runtime_error&)would not catch it.TestBundleNodeHandle(), callingNKWebKit::ToRef(...)inside comparisons (Require(copiedDoc == NKWebKit::ToRef(doc));) leaks retained references. Compare pointers directly using.Get(): Similarly, the test handle reference can be obtained viaconst void* ref = handle.Get();without needing a manual release onref.Suggested Fix
Replacing
TestBundleNodeHandle()incore/libs/prx/libSceNKWebKit/tests/Base.cppwith the following resolves the build failure and prevents reference leaks: