Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 01a43483d35fa5330f40b68da4c10a79beca26b6
https://github.com/WebKit/WebKit/commit/01a43483d35fa5330f40b68da4c10a79beca26b6
Author: Alex Christensen <[email protected]>
Date: 2026-08-12 (Wed, 12 Aug 2026)
Changed paths:
M Source/JavaScriptCore/wasm/WasmCalleeGroup.cpp
M Source/JavaScriptCore/wasm/WasmCalleeGroup.h
M Source/WTF/wtf/ThreadSafeWeakPtr.h
Log Message:
-----------
Remove ThreadSafeWeakOrStrongPtr
https://bugs.webkit.org/show_bug.cgi?id=321619
rdar://184749450
Reviewed by Yusuke Suzuki.
Multiple ThreadSafeWeakPtrs can be used to safely access the same object from
different threads, but currently one ThreadSafeWeakPtr can't be safely accessed
from multiple threads. See rdar://184638719.
This moves the bit indicating weak or strong from inside the pointer to next to
the lock, which will allow me to re-use the TaggingTraits to store an offset,
reducing sizeof(ThreadSafeWeakPtr) to sizeof(void*) which will allow me to make
it atomic, fixing thread safety issues. Moving this bit won't increase memory
use.
* Source/JavaScriptCore/wasm/WasmCalleeGroup.cpp:
(JSC::Wasm::CalleeGroup::tryGetBBQCalleeForLoopOSRConcurrently):
(JSC::Wasm::CalleeGroup::releaseBBQCallee):
(JSC::Wasm::CalleeGroup::installOptimizedCallee):
(JSC::Wasm::CalleeGroup::updateCallsitesToCallUs):
(JSC::Wasm::CalleeGroup::calleeIsReferenced const):
* Source/JavaScriptCore/wasm/WasmCalleeGroup.h:
* Source/WTF/wtf/ThreadSafeWeakPtr.h:
(WTF::ThreadSafeWeakOrStrongPtr::status const): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::isWeak const): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::isStrong const): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::get const): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::convertToWeak): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::tryConvertToStrong): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::operator=): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::ThreadSafeWeakOrStrongPtr): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::~ThreadSafeWeakOrStrongPtr): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::swap): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::copyConstructFrom): Deleted.
(WTF::ThreadSafeWeakOrStrongPtr::moveConstructFrom): Deleted.
Canonical link: https://commits.webkit.org/319082@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications