feat(libwebrtc): implement the SequenceCheckerImpl constructor #17313
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17313"
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 jacknieland on 2026-11-08T17:36:16Z.
What
Implements the
webrtc::webrtc_sequence_checker_internal::SequenceCheckerImpl(bool)constructor (C2Eb) in libwebrtc, which threw.sequence_checker_internal.ccis the same at M127 branch-heads/6533 and M134 branch-heads/6998, the revisions the debt file pins, and theMutexImplconstructor ofmutex_pthread.hdiffers between them only in a comment.src/SequenceChecker.cppfollows both, with their WebRTC copyright notices and BSD licence at the top, asCpuFeatures.cppdoes:lock_becomes a default guest mutex through libkernel'spthread_mutexattr_init,pthread_mutex_initandpthread_mutexattr_destroy, asMutexImpldoes off macOS.attached_takes the argument,valid_thread_ispthread_self(), which is whatrtc::CurrentThreadRef()returns on POSIX, andvalid_queue_isTaskQueueBase::Current(), fromTaskQueueBase.cpp.include/SequenceChecker.hppgives the 32-byte layout:lock_at 0,attached_at 8,valid_thread_at 16 andvalid_queue_at 24. This holds for a build withoutRTC_DCHECK_IS_ON, whereRTC_NO_UNIQUE_ADDRESS([[no_unique_address]]under clang) leavesMutexImpl's empty owner record no space. WithRTC_DCHECK_IS_ONthe record holds abooland apthread_t, and the last three fields move 16 bytes on. Whether the module is such a build is unknown. TheLogMessageandRecursiveCriticalSectionentries already assume a build without it, and the debt entry says so.std::invalid_argument.Tested
Windows 11 Pro (26300), WinLibs GCC 15.2.0 (
x86_64-ucrt-posix-seh, r7), Release,BUILD_TESTING=ON, Ninja, on head07ec9041a1(this branch, onmainef9ab2ea44).guest_webrtc_sequence_checkertest, on storage filled with0xA5first:true,attached_is set,valid_thread_equalspthread_self()andvalid_queue_is null; withfalse, onlyattached_differs.CurrentTaskQueueSetter,valid_queue_is that queue.valid_thread_is that thread, not the main one.lock_is a working mutex: free when constructed,EBUSYto a trylock from another thread while held, free again after unlocking, and destroyed cleanly.std::invalid_argument.ctest -R ^guest_webrtc_ --repeat until-fail:3: all 44 libwebrtc tests pass 3/3.ctest -R public_headers: 65/65 pass.NotImplemented_nid_no_patch(__func__)at the top of the constructor, as themainstub does, the test fails 3/3 with_ZN6webrtc32webrtc_sequence_checker_internal19SequenceCheckerImplC2Eb_nid_postfix not implemented.check_conventions.py --base upstream/mainpasses. No open pull request implementsSequenceCheckerImpl.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-08T17:40:51Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
07ec9041a1:tools/check_conventions.pypassed;git diff --checkclean.guest_webrtc_sequence_checker_tests,libwebrtcbuilt cleanly.guest_webrtc_sequence_checker):core/libs/prx/libwebrtc/Export.cpp,core/libs/prx/libwebrtc/include/Api.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Generated withfooter from the description; the AI-assisted checkbox can stay.Looks Good To Me