Bug 278630
| Summary: | Move some WebCore/WebKitLegacy/WebKit destructors to source files for upstream clang | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | WebCore Misc. | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Kilzer (:ddkilzer)
Move WebCore/WebKitLegacy/WebKit destructors to source files for upstream clang.
Example build errors:
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:68:
In file included from /usr/include/c++/v1/algorithm:1821:
In file included from /usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/usr/include/c++/v1/__memory/unique_ptr.h:65:19: error: invalid application of 'sizeof' to an incomplete type 'WebCore::NativeImageBackend'
65 | static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
| ^~~~~~~~~~~
/usr/include/c++/v1/__memory/unique_ptr.h:278:7: note: in instantiation of member function 'std::default_delete<WebCore::NativeImageBackend>::operator()' requested here
278 | __ptr_.second()(__tmp);
| ^
/usr/include/c++/v1/__memory/unique_ptr.h:248:71: note: in instantiation of member function 'std::unique_ptr<WebCore::NativeImageBackend>::reset' requested here
248 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:168:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/AtomString.h:24:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/AtomStringImpl.h:23:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/UniquedStringImpl.h:28:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/StringImpl.h:35:
In file included from WebKitBuild/Release/usr/local/include/wtf/Vector.h:40:
In file included from WebKitBuild/Release/usr/local/include/wtf/VectorTraits.h:27:
WebKitBuild/Release/usr/local/include/wtf/UniqueRef.h:57:7: note: in instantiation of member function 'std::unique_ptr<WebCore::NativeImageBackend>::~unique_ptr' requested here
57 | class UniqueRef {
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:27:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h:34:
In file included from Source/WebCore/workers/service/ServiceWorkerRegistration.h:32:
In file included from Source/WebCore/Modules/notifications/Notification.h:42:
In file included from Source/WebCore/Modules/notifications/NotificationResources.h:28:
In file included from Source/WebCore/platform/graphics/Image.h:38:
Source/WebCore/platform/graphics/NativeImage.h:43:7: note: in implicit destructor for 'WTF::UniqueRef<WebCore::NativeImageBackend>' first required here
43 | class NativeImage final : public RenderingResource {
| ^
Source/WebCore/platform/graphics/NativeImage.h:43:7: note: in implicit destructor for 'WebCore::NativeImage' first required here
Source/WebCore/platform/graphics/NativeImage.h:41:7: note: forward declaration of 'WebCore::NativeImageBackend'
41 | class NativeImageBackend;
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:68:
In file included from /usr/include/c++/v1/algorithm:1821:
In file included from /usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/usr/include/c++/v1/__memory/unique_ptr.h:65:19: error: invalid application of 'sizeof' to an incomplete type 'WebCore::SVGPathByteStream'
65 | static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
| ^~~~~~~~~~~
/usr/include/c++/v1/__memory/unique_ptr.h:278:7: note: in instantiation of member function 'std::default_delete<WebCore::SVGPathByteStream>::operator()' requested here
278 | __ptr_.second()(__tmp);
| ^
/usr/include/c++/v1/__memory/unique_ptr.h:248:71: note: in instantiation of member function 'std::unique_ptr<WebCore::SVGPathByteStream>::reset' requested here
248 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:27:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h:35:
In file included from Source/WebCore/workers/WorkerGlobalScope.h:32:
In file included from Source/WebCore/html/ImageBitmap.h:30:
In file included from Source/WebCore/platform/graphics/ImageBuffer.h:31:
In file included from Source/WebCore/platform/graphics/ImageBufferBackend.h:31:
In file included from Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h:28:
In file included from Source/WebCore/platform/graphics/GraphicsLayer.h:56:
In file included from Source/WebCore/platform/animation/AcceleratedEffectStack.h:30:
In file included from Source/WebCore/platform/animation/AcceleratedEffect.h:30:
In file included from Source/WebCore/platform/animation/AcceleratedEffectValues.h:34:
In file included from Source/WebCore/rendering/PathOperation.h:32:
Source/WebCore/rendering/style/BasicShapes.h:309:7: note: in instantiation of member function 'std::unique_ptr<WebCore::SVGPathByteStream>::~unique_ptr' requested here
309 | class BasicShapePath final : public BasicShape {
| ^
Source/WebCore/rendering/style/BasicShapes.h:309:7: note: in implicit destructor for 'WebCore::BasicShapePath' first required here
Source/WebCore/rendering/style/BasicShapes.h:51:7: note: forward declaration of 'WebCore::SVGPathByteStream'
51 | class SVGPathByteStream;
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:165:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashMap.h:25:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashTable.h:33:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashTraits.h:26:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashFunctions.h:26:
In file included from WebKitBuild/Release/usr/local/include/wtf/RefPtr.h:28:
WebKitBuild/Release/usr/local/include/wtf/Ref.h:62:16: error: member access into incomplete type 'WebCore::GPU'
62 | ptr->deref();
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:165:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashMap.h:25:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashTable.h:33:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashTraits.h:26:
In file included from WebKitBuild/Release/usr/local/include/wtf/HashFunctions.h:26:
WebKitBuild/Release/usr/local/include/wtf/RefPtr.h:60:47: note: in instantiation of member function 'WTF::DefaultRefDerefTraits<WebCore::GPU>::derefIfNotNull' requested here
60 | ALWAYS_INLINE ~RefPtr() { RefDerefTraits::derefIfNotNull(PtrTraits::exchange(m_ptr, nullptr)); }
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:51:
Source/WebCore/page/WorkerNavigator.h:37:7: note: in instantiation of member function 'WTF::RefPtr<WebCore::GPU>::~RefPtr' requested here
37 | class WorkerNavigator final : public NavigatorBase, public Supplementable<WorkerNavigator> {
| ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource446.cpp:1:
In file included from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:51:
In file included from Source/WebCore/page/WorkerNavigator.h:29:
Source/WebCore/page/NavigatorBase.h:38:7: note: forward declaration of 'WebCore::GPU'
38 | class GPU;
| ^
3 errors generated.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
<rdar://134660411>
David Kilzer (:ddkilzer)
*** Bug 278629 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/32688
David Kilzer (:ddkilzer)
Committed 282753@main (b2f4995): https://commits.webkit.org/282753@main
Reviewed commits have been landed. Closing PR #32688 and removing active labels.