Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cdf0e8ad7972a47c7ef9a620b28dcbc12eeb88f9 https://github.com/WebKit/WebKit/commit/cdf0e8ad7972a47c7ef9a620b28dcbc12eeb88f9 Author: Geoffrey Garen <gga...@apple.com> Date: 2024-05-01 (Wed, 01 May 2024)
Changed paths: M Source/WTF/wtf/TypeTraits.h M Source/WTF/wtf/WeakPtr.h M Source/WTF/wtf/WeakRef.h Log Message: ----------- Weak ref smart pointer check should be smarter https://bugs.webkit.org/show_bug.cgi?id=273594 rdar://127395924 Reviewed by Chris Dumez. Improved the SFINAE usage to account for const/non-const overload. Moved the static_assert to dereference operations so that WeakPtr<T> can be more like T* in its support for forward declaration. Now you don't need the full type definition available in order to destroy a WeakPtr<T>; only to dereference one. * Source/WTF/wtf/TypeTraits.h: * Source/WTF/wtf/WeakPtr.h: (WTF::WeakPtr::releaseImpl): (WTF::WeakPtr::get const): (WTF::WeakPtr::operator-> const): (WTF::WeakPtr::operator* const): (WTF::WeakPtr::~WeakPtr): Deleted. * Source/WTF/wtf/WeakRef.h: (WTF::WeakRef::ptrAllowingHashTableEmptyValue const): (WTF::WeakRef::ptr const): (WTF::WeakRef::get const): (WTF::WeakRef::~WeakRef): Deleted. Canonical link: https://commits.webkit.org/278249@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes