Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 10945fb82e3a6ec036c74f8446cca1bc57d4da6c
      
https://github.com/WebKit/WebKit/commit/10945fb82e3a6ec036c74f8446cca1bc57d4da6c
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M Source/WTF/wtf/WeakPtr.h
    M Source/WTF/wtf/WeakPtrFactory.h
    M Source/WTF/wtf/WeakPtrImpl.h
    M Source/WTF/wtf/WeakRef.h
    M Source/WebCore/dom/ShadowRoot.cpp
    M Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
    M Source/WebCore/rendering/FloatingObjects.cpp
    M Source/WebCore/rendering/LegacyRootInlineBox.cpp
    M Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp

  Log Message:
  -----------
  Update WeakPtr threading assertions to catch more bugs
https://bugs.webkit.org/show_bug.cgi?id=308941
rdar://171562170

Reviewed by Darin Adler.

Update WeakPtr threading assertions to catch more bugs:
- Leverage ThreadLikeAssertion instead of a simple `wasConstructedOnMainThread`
  boolean to distinguish different threads / work queues.
- Promote ASSERT to ASSERT_WITH_SECURITY_IMPLICATION

* Source/WTF/wtf/WeakPtr.h:
(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtr::get const):
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const):
(WTF::WeakPtr::enableWeakPtrThreadingAssertions const):
(WTF::WeakPtr::canSafelyBeUsed const):
(WTF::PtrTraits>::WeakPtr):
(WTF::=):
* Source/WTF/wtf/WeakPtrFactory.h:
(WTF::WeakPtrFactory::WeakPtrFactory):
(WTF::WeakPtrFactory::prepareForUseOnlyOnMainThread):
(WTF::WeakPtrFactory::prepareForUseOnlyOnNonMainThread):
(WTF::WeakPtrFactory::~WeakPtrFactory):
(WTF::WeakPtrFactory::initializeIfNeeded const):
(WTF::WeakPtrFactoryWithBitField::WeakPtrFactoryWithBitField):
(WTF::WeakPtrFactoryWithBitField::~WeakPtrFactoryWithBitField):
(WTF::WeakPtrFactoryWithBitField::initializeIfNeeded const):
* Source/WTF/wtf/WeakPtrImpl.h:
(WTF::WeakPtrImplBase::clear):
(WTF::WeakPtrImplBase::threadAssertion const):
(WTF::WeakPtrImplBase::WeakPtrImplBase):
(WTF::WeakPtrImplBase::~WeakPtrImplBase):
(WTF::WeakPtrImplBaseSingleThread::clear):
(WTF::WeakPtrImplBaseSingleThread::threadAssertion const):
(WTF::WeakPtrImplBaseSingleThread::WeakPtrImplBaseSingleThread):
(WTF::WeakPtrImplBaseSingleThread::~WeakPtrImplBaseSingleThread):
(WTF::WeakPtrImplBase::wasConstructedOnMainThread const): Deleted.
(WTF::WeakPtrImplBaseSingleThread::wasConstructedOnMainThread const): Deleted.
* Source/WTF/wtf/WeakRef.h:
(WTF::WeakRef::requires):
(WTF::WeakRef::WeakRef):
(WTF::WeakRef::operator-> const):
(WTF::WeakRef::enableWeakPtrThreadingAssertions const):
(WTF::WeakRef::canSafelyBeUsed const):
* Source/WebCore/dom/ShadowRoot.cpp:
* Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webKitMediaCommonEncryptionDecryptGetCDMProxyDecryptionClient):
* Source/WebCore/rendering/FloatingObjects.cpp:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
* Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

Canonical link: https://commits.webkit.org/308610@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to