feat(libSceNKWebKit): implement the WebCore::TrackPrivateBase default getters #19147
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19147"
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-12T21:44:55Z.
What
Implements the
id,label,languageandstartTimeVarianceexports ofWebCore::TrackPrivateBasein the newsrc/TrackPrivateBase.cpp. They are the default virtual bodies in the pinned PS5 TrackPrivateBase.h: the first three returnemptyAtom(), the last a copy ofMediaTime::zeroTime().emptyAtom()holds WebKit's statics_emptyAtomString. This library's static empty string has the same shape: a static reference count and the 8-bit, atom and reported-cost flags (hashAndFlags & 0xff == 28). So the getters return it with a reference added, asAtomString(WtfValueExports.hpp). The time comes from the existingMediaTime::zeroTime(). Both types are returned through the hidden result pointer. The bodies never read the object, so a null object is accepted.Left throwing, as the debt entry says: the constructor, destructors,
willBeRemovedand the allocation operators, which need the module's vtables or the client's virtualwillRemove. The removed placeholders lower the count in the "Additional callable exports" debt entry from 5961 to 5957.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: constructs each result in a poisoned buffer through the hidden result pointer and checks that the atom getters return the library's static empty string (atom and 8-bit flags set) with exactly one reference added and released on destruction, thatstartTimeVariancereturns a separate copy with value 0, scale 1 and the valid flag at their offsets, and that a null or poisoned object is neither read nor written. It fails with each of 8 mutations: a throwing stub in each export, a null atom, a leaked extra reference, and returninginvalidTimeorpositiveInfiniteTime..prx: each export writes its result throughrdi(an 8-byte string pointer, or the 8 + 4 + 1 bytes ofMediaTime) and returns that pointer inrax.main59f3a64cf6: all 137nkwebkitandpublic_headerstests pass;python tools/check_conventions.py --base origin/mainpasses.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)Note: like every PR that removes NKWebKit inventory placeholders, this changes the count line in
docs/dev/debt/libSceNKWebKit.md; I will rebase and recompute it whenever another such PR merges first.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-12T21:54:21Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
6cee9fe17a: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.Requesting changes for the points above.
Pull request closed