summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp2
-rw-r--r--Source/WebKit/android/nav/WebView.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 8838f14..d07b00e 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -877,6 +877,8 @@ BaseLayerAndroid* WebViewCore::createBaseLayer(GraphicsLayerAndroid* root)
realBase->setSize(content->width(), content->height());
realBase->addChild(baseBackground);
realBase->addChild(base);
+ baseBackground->unref();
+ base->unref();
} else {
realBase = new BaseLayerAndroid(content);
base = realBase;
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 473efdb..7485e83 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -530,7 +530,7 @@ bool setBaseLayer(BaseLayerAndroid* newBaseLayer, bool showVisualIndicator,
void copyBaseContentToPicture(SkPicture* picture)
{
- if (!m_baseLayer)
+ if (!m_baseLayer || !m_baseLayer->content())
return;
LayerContent* content = m_baseLayer->content();
content->draw(picture->beginRecording(content->width(), content->height(),
@@ -539,7 +539,7 @@ void copyBaseContentToPicture(SkPicture* picture)
}
bool hasContent() {
- if (!m_baseLayer)
+ if (!m_baseLayer || !m_baseLayer->content())
return false;
return !m_baseLayer->content()->isEmpty();
}