summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-10-15 13:59:34 +0100
committerSteve Block <steveblock@google.com>2010-10-15 14:20:59 +0100
commitc5e3c39f9443b87adf41917764e730a93937e2ef (patch)
treea7d90bc9f76840a23528a7a505869573b1792dc9 /WebCore/platform
parent27dd31673790eed64c3e0e508bb900671f06bcb3 (diff)
downloadexternal_webkit-c5e3c39f9443b87adf41917764e730a93937e2ef.zip
external_webkit-c5e3c39f9443b87adf41917764e730a93937e2ef.tar.gz
external_webkit-c5e3c39f9443b87adf41917764e730a93937e2ef.tar.bz2
Fix a crash when deleting GraphicsContextPlatformPrivate
Make sure PlatformGraphicsContext::mCanvas is still around when we call restore(). Bug: 3071206 Change-Id: I5b3bc40448e1d891a47f214d18daf345d55d9284
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index d999bba..b76f5d5 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -187,13 +187,13 @@ public:
~GraphicsContextPlatformPrivate()
{
- if (m_platformGfxCtx && m_platformGfxCtx->deleteUs())
- delete m_platformGfxCtx;
-
// We force restores so we don't leak any subobjects owned by our
// stack of State records.
while (m_stateStack.count() > 0)
this->restore();
+
+ if (m_platformGfxCtx && m_platformGfxCtx->deleteUs())
+ delete m_platformGfxCtx;
}
void save()