Title: [87752] trunk/Source/WebCore
Revision
87752
Author
[email protected]
Date
2011-05-31 14:50:19 -0700 (Tue, 31 May 2011)

Log Message

2011-05-31  James Robinson  <[email protected]>

        Reviewed by Kenneth Russell.

        [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
        https://bugs.webkit.org/show_bug.cgi?id=61593

        Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
        This is extremely defensive and not strictly necessary, but not harmful either.

        * platform/graphics/chromium/LayerChromium.h:
        * platform/graphics/chromium/cc/CCLayerImpl.cpp:
        (WebCore::CCLayerImpl::~CCLayerImpl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (87751 => 87752)


--- trunk/Source/WebCore/ChangeLog	2011-05-31 21:15:16 UTC (rev 87751)
+++ trunk/Source/WebCore/ChangeLog	2011-05-31 21:50:19 UTC (rev 87752)
@@ -1,3 +1,17 @@
+2011-05-31  James Robinson  <[email protected]>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
+        https://bugs.webkit.org/show_bug.cgi?id=61593
+
+        Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
+        This is extremely defensive and not strictly necessary, but not harmful either.
+
+        * platform/graphics/chromium/LayerChromium.h:
+        * platform/graphics/chromium/cc/CCLayerImpl.cpp:
+        (WebCore::CCLayerImpl::~CCLayerImpl):
+
 2011-05-31  Stephen White  <[email protected]>
 
         Unreviewed; build fix.

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h (87751 => 87752)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h	2011-05-31 21:15:16 UTC (rev 87751)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h	2011-05-31 21:50:19 UTC (rev 87752)
@@ -215,6 +215,7 @@
     static const unsigned s_texCoordAttribLocation;
 
     friend class TreeSynchronizer;
+    friend class CCLayerImpl;
     // Constructs a CCLayerImpl of the correct runtime type for this LayerChromium type.
     virtual PassRefPtr<CCLayerImpl> createCCLayerImpl();
     // FIXME: Remove when https://bugs.webkit.org/show_bug.cgi?id=58830 is fixed.

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (87751 => 87752)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp	2011-05-31 21:15:16 UTC (rev 87751)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp	2011-05-31 21:50:19 UTC (rev 87752)
@@ -81,6 +81,8 @@
 
 CCLayerImpl::~CCLayerImpl()
 {
+    if (m_owner)
+        m_owner->setCCLayerImpl(0);
 }
 
 void CCLayerImpl::addChild(PassRefPtr<CCLayerImpl> child)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to