feat(libSceNKWebKit): implement the WebCore::TrackPrivateBase constructor and default getters #19704
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19704"
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 c1b3r-p3d1a on 2026-11-13T20:53:39Z.
What
Brings back the
WebCore::TrackPrivateBasegetters from #19147, together with the code that creates the object, as asked when #19147 was closed._ZN7WebCore16TrackPrivateBaseC2Ev, the base constructor, now creates the object. A subclass a title defines calls it before its own constructor body. It stores a pointer to this library'sTrackPrivateBasevtable at offset 0 and theThreadSafeRefCountedcount of 1 (m_refCount { 1 }) at offset 8. It writes nothing at offsets 12 to 15: the class is not POD, so a subclass may place its first field in that tail padding.D2is already a no-op onmain(a bareretin the 11.00 module,NoOpExports.cpp). So a title's subclass can now be constructed, used and destroyed, and its vtable reachesid,label,languageandstartTimeVariance. These return the defaults of the pinned TrackPrivateBase.h: the empty atom (this library's static empty string, flagged as an atom) and a copy ofMediaTime::zeroTime().RELEASE_LOGfields. ARefPtr<const Logger>member would giveD2a body, and the 11.00D2is empty. The exported names also have nosetLogger.WtfJson.cpp, holds the destructors,__cxa_pure_virtualforclient(), then the exported virtuals in declaration order, with no type info. The subclass constructor overwrites it before anything can read it.Still throwing, as the debt entry says:
D1andD0: the class is abstract (noC1is exported), so a subclass never calls them. Their 11.00 bodies are not a bareretand were not read.willBeRemoved: the slot of the client'swillRemovedepends on the WebKit revision.The 4 getters and the constructor leave the inventory table.
Unverified: nothing was compared with a console module.
Tested
Windows 11, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh r7), Release.
nkwebkit_trackprivatebase:0xa5, then checks the vtable header (offset-to-top and type info null), the count of exactly 1 at offset 8, and that bytes 12 to 31 are untouched.id,label,language,trackIndexandstartTimeVariancethrough the stored vtable, and builds twice to get the same vtable.idandlabelslots is not detected, because both return the empty atom.mainfb2ba350f9: the 79 tests matchingnkwebkitand the 65public_headerstests pass.python tools/check_conventions.py --base origin/mainpasses.objdumpof the builtC2:thisarrives inrdi. It stores the vtable address at0(%rdi)and doesmovl $0x1,0x8(%rdi), with no other store.libSceNKWebKit.prxis not copied over the one staged inbuild/tests(#17895), so I copied it there before each run.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-14T02:34:14Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
941839c083:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_trackprivatebase_testsbuilt cleanly.nkwebkit_trackprivatebase):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me