summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-10-19 13:24:00 -0400
committerDerek Sollenberger <djsollen@google.com>2010-10-19 13:24:00 -0400
commitf0de54d27693cb9b5dd671641f5b6f0adfda5372 (patch)
treec6ba94d19af9b0c4c1a9c1e9c18fd04ce26732cd /WebCore
parent456bc40a2584f222aecc5331f26ae5ce7a9fc8aa (diff)
downloadexternal_webkit-f0de54d27693cb9b5dd671641f5b6f0adfda5372.zip
external_webkit-f0de54d27693cb9b5dd671641f5b6f0adfda5372.tar.gz
external_webkit-f0de54d27693cb9b5dd671641f5b6f0adfda5372.tar.bz2
Fix crash in hardware accelerated webviews.
We are not freeing the baseTile objects when leaving a page and are running out of memory. bug: 3107362 Change-Id: I52539d7b94d914b9ede44715362cbde94a7c077e
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/TiledPage.cpp4
-rw-r--r--WebCore/platform/graphics/android/TiledPage.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/TiledPage.cpp b/WebCore/platform/graphics/android/TiledPage.cpp
index f42105e..7bdea98 100644
--- a/WebCore/platform/graphics/android/TiledPage.cpp
+++ b/WebCore/platform/graphics/android/TiledPage.cpp
@@ -59,6 +59,10 @@ TiledPage::TiledPage(int id, GLWebViewState* state)
{
}
+TiledPage::~TiledPage() {
+ deleteAllValues(m_baseTiles);
+}
+
BaseTile* TiledPage::getBaseTile(int x, int y)
{
// if (x,y) is (0,0) the HashMap will treat the key as a null value and will
diff --git a/WebCore/platform/graphics/android/TiledPage.h b/WebCore/platform/graphics/android/TiledPage.h
index 917ba4b..94306bf 100644
--- a/WebCore/platform/graphics/android/TiledPage.h
+++ b/WebCore/platform/graphics/android/TiledPage.h
@@ -52,6 +52,7 @@ typedef HashMap<TileKey, BaseTile*> TileMap;
class TiledPage {
public:
TiledPage(int id, GLWebViewState* state);
+ ~TiledPage();
// returns the other TiledPage who shares the same GLWebViewState
TiledPage* sibling();