WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
278282
WebCore::SameSizeAsNode must use WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR
https://bugs.webkit.org/show_bug.cgi?id=278282
Summary
WebCore::SameSizeAsNode must use WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR
David Kilzer (:ddkilzer)
Reported
2024-08-17 16:57:36 PDT
WebCore::SameSizeAsNode must use WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR when built with upstream clang. Error message: In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:1: In file included from Source/WebCore/dom/MutationObserver.cpp:34: In file included from Source/WebCore/dom/MutationObserver.h:34: In file included from Source/WebCore/dom/ExceptionOr.h:30: In file included from WebKitBuild/Release/usr/local/include/wtf/CrossThreadCopier.h:41: In file included from WebKitBuild/Release/usr/local/include/wtf/ObjectIdentifier.h:29: In file included from WebKitBuild/Release/usr/local/include/wtf/UUID.h:33: In file included from WebKitBuild/Release/usr/local/include/wtf/Hasher.h:25: In file included from WebKitBuild/Release/usr/local/include/wtf/CheckedPtr.h:28: WebKitBuild/Release/usr/local/include/wtf/CheckedRef.h:309:48: error: no type named 'WTFDidOverrideDeleteForCheckedPtr' in 'WebCore::SameSizeAsNode' 309 | static_assert(std::is_same<typename T::WTFDidOverrideDeleteForCheckedPtr, int>::value, "Objects that use CanMakeCheckedPtr must use WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR"); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:8: Source/WebCore/dom/Node.cpp:111:8: note: in instantiation of member function 'WTF::CanMakeCheckedPtr<WebCore::SameSizeAsNode>::~CanMakeCheckedPtr' requested here 111 | struct SameSizeAsNode : EventTarget, CanMakeCheckedPtr<SameSizeAsNode> { | ^ 1 error generated. But only adding WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(SameSizeAsNode) results in more errors, so we also have to add WTF_MAKE_FAST_ALLOCATED: In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:8: Source/WebCore/dom/Node.cpp:112:5: error: too few arguments to function call, expected 3, have 1 112 | WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(SameSizeAsNode); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:1: In file included from Source/WebCore/WebCorePrefix.h:164: WebKitBuild/Release/usr/local/include/wtf/FastMalloc.h:633:5: note: expanded from macro 'WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR' 633 | WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR_IMPL(ClassName) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WebKitBuild/Release/usr/local/include/wtf/FastMalloc.h:626:30: note: expanded from macro 'WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR_IMPL' 626 | T::operator delete(object); \ | ~~~~~~~~~~~~~~~~~~ ^ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:8: Source/WebCore/dom/Node.cpp:112:5: note: 'operator delete' declared here 112 | WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(SameSizeAsNode); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource170.cpp:1: In file included from Source/WebCore/WebCorePrefix.h:164: WebKitBuild/Release/usr/local/include/wtf/FastMalloc.h:633:5: note: expanded from macro 'WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR' 633 | WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR_IMPL(ClassName) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WebKitBuild/Release/usr/local/include/wtf/FastMalloc.h:619:6: note: expanded from macro 'WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR_IMPL' 619 | void operator delete(T* object, std::destroying_delete_t, size_t size) { \ | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-08-17 16:57:49 PDT
<
rdar://problem/134157361
>
David Kilzer (:ddkilzer)
Comment 2
2024-08-17 17:03:13 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/32350
David Kilzer (:ddkilzer)
Comment 3
2024-08-20 16:13:49 PDT
Committed
282518@main
(aeda8bb):
https://commits.webkit.org/282518@main
Reviewed commits have been landed. Closing PR #32350 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug