WebKit Bugzilla
Attachment 341697 Details for
Bug 180232
: Remove virtual function calls in GraphicsLayer destructors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-180232-20180531171724.patch (text/plain), 4.32 KB, created by
Michael Catanzaro
on 2018-05-31 15:17:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2018-05-31 15:17:25 PDT
Size:
4.32 KB
patch
obsolete
>Subversion Revision: 232297 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 760d774253ae9815bcce8a739e58d4c341e25877..6a4211f990e197a3457e8690f3c444f8161058d1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-31 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ Virtual function calls in GraphicsLayer destructors >+ https://bugs.webkit.org/show_bug.cgi?id=180232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make these classes final, and add warning comments regarding the virtual function calls in >+ the destructor. They should be OK. >+ >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::GraphicsLayerCA::~GraphicsLayerCA): >+ * platform/graphics/ca/GraphicsLayerCA.h: >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: >+ (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: >+ > 2018-05-30 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, silence a -Wreturn-type warning >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index 9ebd17494e4c96856dc21fc34d63429f3f30b0c1..bc404d43bd5c3011b31465efb5da7f592ad0af09 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -432,7 +432,9 @@ GraphicsLayerCA::~GraphicsLayerCA() > if (UNLIKELY(isTrackingDisplayListReplay())) > layerDisplayListMap().remove(this); > >- // Do cleanup while we can still safely call methods on the derived class. >+ // This is the last point where calling virtual functions can be expected to work. >+ // This is a virtual function call that itself calls another virtual function, >+ // GraphicsLayer::removeFromParent. Accordingly, this class is marked final. > willBeDestroyed(); > } > >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h >index ee41cd43d468ad62bc4130ca9b74b62027f29de9..a35280568fdd7374603bbed0e061b6f7ec2fe383 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h >@@ -47,7 +47,7 @@ class FloatRoundedRect; > class Image; > class TransformState; > >-class GraphicsLayerCA : public GraphicsLayer, public PlatformCALayerClient { >+class GraphicsLayerCA final : public GraphicsLayer, public PlatformCALayerClient { > public: > > WEBCORE_EXPORT explicit GraphicsLayerCA(Type, GraphicsLayerClient&); >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >index 3640c3ecd9b6b7b7cc9cdbf2b241a5fd7f414b48..c77c5e212f2f455e776dc735d358c3d1ffe1034e 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -151,8 +151,13 @@ CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer() > purgeBackingStores(); > m_coordinator->detachLayer(this); > } >+ > ASSERT(!m_coordinatedImageBacking); > ASSERT(!m_mainBackingStore); >+ >+ // This is the last point where calling virtual functions can be expected to work. >+ // This is a virtual function call that itself calls another virtual function, >+ // GraphicsLayer::removeFromParent. Accordingly, this class is marked final. > willBeDestroyed(); > } > >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >index ff4adff8223ea67f9f4da4f776dd7876291019c1..72185a4e7272a8fe1c4e5e1a114c25220b4aa901 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >@@ -56,7 +56,7 @@ public: > virtual void syncLayerState(CoordinatedLayerID, CoordinatedGraphicsLayerState&) = 0; > }; > >-class WEBCORE_EXPORT CoordinatedGraphicsLayer : public GraphicsLayer >+class WEBCORE_EXPORT CoordinatedGraphicsLayer final : public GraphicsLayer > , public TiledBackingStoreClient > , public CoordinatedImageBacking::Host { > public:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 180232
:
328066
|
341697
|
355534
|
369726
|
369727
|
426588