feat(libSceNKWebKit): implement WTF Cairo RefPtr helpers #24154
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24154"
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 Nino4you on 2026-11-20T08:15:35Z.
What
Implement the four
WTF::refIfNotNullandWTF::derefIfNotNullspecializations forcairo_tandcairo_surface_tinlibSceNKWebKit, following pinned WebKitSource/WebCore/platform/graphics/cairo/RefPtrCairo.cpp@c55364d53f971f63a709976f168d932d558b8909:_ZN3WTF12refIfNotNullI6_cairoEEvPT_-> forwards non-null handles tocairo_reference_ZN3WTF14derefIfNotNullI6_cairoEEvPT_-> forwards non-null handles tocairo_destroy_ZN3WTF12refIfNotNullI14_cairo_surfaceEEvPT_-> forwards non-null handles tocairo_surface_reference_ZN3WTF14derefIfNotNullI14_cairo_surfaceEEvPT_-> forwards non-null handles tocairo_surface_destroyRemoves the four throwing stubs from
Export.cppandinclude/LegacyExports.hpp, declares the typed SysV signatures ininclude/RefPtrCairoExports.hpp(included fromlibSceNKWebKit.hpp), addstests/RefPtrCairo.cpp(nkwebkit_refptrcairo, linked withlibcairo), and records technical debt indocs/dev/debt/changes/feat-nkwebkit-refptr-cairo.md.Tested
Linux x86-64 (Debian 12, GCC 12.2.0, Ninja Release,
BUILD_TESTING=ON), baseupstream/main7d2270cb86:RefPtrCairo.cpp.o,Export.cpp.o,tests/RefPtrCairo.cpp.o, andlibcairo.prxcleanly (fulllibSceNKWebKitlink on GCC 12.2 hits pre-existingDragImageAbi.hppunion default-constructor error from #22977).RefPtrCairo.cpp.o+tests/RefPtrCairo.cpp.oagainstlibcairo.prxandlibc.prxand ran the test binary: passed (exit 0; verified null no-ops,CairoSurfacerefcounting via destroy user-data callback,CairoContextrefcounting via tracked target surface lifetime, and interop withcairo_destroy/cairo_surface_destroy).ctest --test-dir build -R '^public_headers$' --output-on-failure: 1/1 passed.python3 tools/debt_fold.py --check: passed.python3 tools/check_test_registration.py build: passed.python3 tools/check_conventions.py --base upstream/main: all conventions checks passed (0 errors, 0 warnings).python3 tools/guest_pointer_audit.py libSceNKWebKit: 0 findings inRefPtrCairo.cpp.tools/pr_overlap.py --names(all 4 exportsopen: none) andtools/pr_overlap.py --branch feat/nkwebkit-refptr-cairo: 0 overlapping exports or new files.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 PrivacyOnion on 2026-11-20T08:17:49Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3f9fed0369:tools/check_conventions.pypassed.nkwebkit_refptrcairo_testsbuilt cleanly.nkwebkit_refptrcairo):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/RefPtrCairo.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-20T09:03:38Z.
Review: APPROVED
Reviewed — looks good
The implementation matches the described null-safe Cairo reference forwarding, and the source and tests included in the review bundle show no verified blocking defect.
What I ran
Reviewed head
3f9fed0369c0367e120b0649a509da301a1ea1ca. No commands or tests were run during this review;repo_read.pywas used to inspect the prepared diff and targeted source files. The author reports Linux x86-64 build and test checks in the PR description; those were not run by me.Results
Export.cppfull textFindings
Blocking
None verified.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review bundle because it was too large; its changed hunks indiff.patchwere reviewed.review/files.jsonwas unavailable through the reader, so other exclusions could not be confirmed. No tests were run by me, and Windows, console, and title behavior were not verified. The PR description reports author-run checks, but this review does not independently confirm them.Files read:
description.md,commits.md,manifest.json,diff.patch,core/libs/prx/libSceNKWebKit/CMakeLists.txt,core/libs/prx/libSceNKWebKit/include/RefPtrCairoExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/RefPtrCairo.cpp,core/libs/prx/libSceNKWebKit/tests/RefPtrCairo.cpp,docs/dev/debt/changes/feat-nkwebkit-refptr-cairo.md,core/libs/prx/libcairo/include/Context.hpp, and matching declarations incore/libs/prx/libcairo/include/Surface.hpp.Export.cppfull text was excluded.To get this to a good state
Nothing is required.
Pull request closed