Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 293a7d44cdd5185d6f668a83f8c561cb25998a6d
https://github.com/WebKit/WebKit/commit/293a7d44cdd5185d6f668a83f8c561cb25998a6d
Author: Chris Dumez <[email protected]>
Date: 2026-03-02 (Mon, 02 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/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
M
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.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
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::get const):
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const):
(WTF::WeakPtr::canSafelyBeUsed const):
* 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::operator-> const):
(WTF::WeakRef::canSafelyBeUsed const):
* Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
*
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webKitMediaCommonEncryptionDecryptGetCDMProxyDecryptionClient):
* Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
Canonical link: https://commits.webkit.org/308485@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications