Title: [129956] trunk/Source/WebCore
Revision
129956
Author
[email protected]
Date
2012-09-28 16:07:39 -0700 (Fri, 28 Sep 2012)

Log Message

TextureMapperGL destructor crashes
https://bugs.webkit.org/show_bug.cgi?id=97942

Patch by Luiz Agostini <[email protected]> on 2012-09-28
Reviewed by Noam Rosenthal.

BitmapTextureGL destructor uses a TextureMapperGL instance. The problem is that
BitmapTextureGL objects are destroyed on TextureMapper destructor and at that
time TextureMapperGL specific methods and data are not available any more.

This patch creates a new protected method TextureMapper::clearTexturePool()
that is called in TextureMapperGL's destructor.

* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::clearTexturePool):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::~TextureMapperGL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129955 => 129956)


--- trunk/Source/WebCore/ChangeLog	2012-09-28 22:42:57 UTC (rev 129955)
+++ trunk/Source/WebCore/ChangeLog	2012-09-28 23:07:39 UTC (rev 129956)
@@ -1,3 +1,22 @@
+2012-09-28  Luiz Agostini  <[email protected]>
+
+        TextureMapperGL destructor crashes
+        https://bugs.webkit.org/show_bug.cgi?id=97942
+
+        Reviewed by Noam Rosenthal.
+
+        BitmapTextureGL destructor uses a TextureMapperGL instance. The problem is that 
+        BitmapTextureGL objects are destroyed on TextureMapper destructor and at that 
+        time TextureMapperGL specific methods and data are not available any more.
+
+        This patch creates a new protected method TextureMapper::clearTexturePool()
+        that is called in TextureMapperGL's destructor.
+
+        * platform/graphics/texmap/TextureMapper.h:
+        (WebCore::TextureMapper::clearTexturePool):
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGL::~TextureMapperGL):
+
 2012-09-28  Julien Chaffraix  <[email protected]>
 
         REGRESSION(r124168): Null crash in RenderLayer::createScrollbar

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (129955 => 129956)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2012-09-28 22:42:57 UTC (rev 129955)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2012-09-28 23:07:39 UTC (rev 129956)
@@ -151,6 +151,7 @@
         , m_textDrawingMode(TextModeFill)
         , m_accelerationMode(accelerationMode)
     {}
+    void clearTexturePool() { m_texturePool.clear(); }
 
 private:
 #if USE(TEXTURE_MAPPER_GL)

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (129955 => 129956)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2012-09-28 22:42:57 UTC (rev 129955)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2012-09-28 23:07:39 UTC (rev 129956)
@@ -844,6 +844,7 @@
 
 TextureMapperGL::~TextureMapperGL()
 {
+    clearTexturePool();
     delete m_data;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to