summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-03-01 12:46:27 -0800
committerNicolas Roard <nicolas@android.com>2011-03-02 10:59:53 -0800
commit0deeab6aee62df9601e2b0c345b0d364cb8228f0 (patch)
tree3f64389fb04436427e45c13c79e642036985499a /WebCore/platform
parenta5a134d46fff70c2381580d79047dd08368f63ee (diff)
downloadexternal_webkit-0deeab6aee62df9601e2b0c345b0d364cb8228f0.zip
external_webkit-0deeab6aee62df9601e2b0c345b0d364cb8228f0.tar.gz
external_webkit-0deeab6aee62df9601e2b0c345b0d364cb8228f0.tar.bz2
Fix Browser ANR
The dtor of GLWebViewState is calling the dtor of its TiledPage variables; the dtor of TiledPage wait until any pending painting operations running in the TextureGenerator thread are done. The painting operations ultimately paint using the current GLWebViewState's base layer. We were doing unref() on the baselayer before destroying the TiledPage... bug:3429924 Change-Id: I685e7fca5e5bae796f808debbf7e4ce668b83e6b
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index c25a6e8..5e1285f 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -96,9 +96,15 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex)
GLWebViewState::~GLWebViewState()
{
- SkSafeUnref(m_currentBaseLayer);
+ // We have to destroy the two tiled pages first as their destructor
+ // may depend on the existence of this GLWebViewState and some of its
+ // instance variables in order to complete.
+ // Explicitely, currently we need to have the m_currentBaseLayer around
+ // in order to complete any pending paint operations (the tiled pages
+ // will remove any pending operations, and wait if one is underway).
delete m_tiledPageA;
delete m_tiledPageB;
+ SkSafeUnref(m_currentBaseLayer);
#ifdef DEBUG_COUNT
ClassTracker::instance()->decrement("GLWebViewState");
#endif