Changeset 129956 in webkit


Ignore:
Timestamp:
Sep 28, 2012, 4:07:39 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Luiz Agostini <luiz.agostini@nokia.com> 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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r129955 r129956  
     12012-09-28  Luiz Agostini  <luiz.agostini@nokia.com>
     2
     3        TextureMapperGL destructor crashes
     4        https://bugs.webkit.org/show_bug.cgi?id=97942
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        BitmapTextureGL destructor uses a TextureMapperGL instance. The problem is that
     9        BitmapTextureGL objects are destroyed on TextureMapper destructor and at that
     10        time TextureMapperGL specific methods and data are not available any more.
     11
     12        This patch creates a new protected method TextureMapper::clearTexturePool()
     13        that is called in TextureMapperGL's destructor.
     14
     15        * platform/graphics/texmap/TextureMapper.h:
     16        (WebCore::TextureMapper::clearTexturePool):
     17        * platform/graphics/texmap/TextureMapperGL.cpp:
     18        (WebCore::TextureMapperGL::~TextureMapperGL):
     19
    1202012-09-28  Julien Chaffraix  <jchaffraix@webkit.org>
    221
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h

    r128572 r129956  
    152152        , m_accelerationMode(accelerationMode)
    153153    {}
     154    void clearTexturePool() { m_texturePool.clear(); }
    154155
    155156private:
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

    r129931 r129956  
    845845TextureMapperGL::~TextureMapperGL()
    846846{
     847    clearTexturePool();
    847848    delete m_data;
    848849}
Note: See TracChangeset for help on using the changeset viewer.