[Webkit-unassigned] [Bug 278282] New: WebCore::SameSizeAsNode must use WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 17 16:57:36 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=278282

            Bug ID: 278282
           Summary: WebCore::SameSizeAsNode must use
                    WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240817/57bc5dc4/attachment-0001.htm>


More information about the webkit-unassigned mailing list