diff options
| author | Mattias Falk <mattias.falk@sonyericsson.com> | 2012-06-05 11:56:15 +0200 |
|---|---|---|
| committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-06-19 08:58:07 +0200 |
| commit | 5550319aaa0f9d0a05283a10971fc3240b9ed8eb (patch) | |
| tree | 57e8ce6d88d46fa3794450e660a6ee7cc3cbf3c9 | |
| parent | 31874a9d49b110cd82de0efc5eab2c9cddcddde1 (diff) | |
| download | external_webkit-5550319aaa0f9d0a05283a10971fc3240b9ed8eb.zip external_webkit-5550319aaa0f9d0a05283a10971fc3240b9ed8eb.tar.gz external_webkit-5550319aaa0f9d0a05283a10971fc3240b9ed8eb.tar.bz2 | |
Don't use deleted Node object in setSizeScreenWidthAndScale
The call to forceLayout may cause the Node object to be
deleted. Avoid crash by check that the Node object is
still valid when forceLayout has returned.
Change-Id: Ieb74a59ca7f2e457b3b17d01bcb02cd566f84ef2
| -rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 1e406b1..1b53a6e 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -1359,7 +1359,7 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height, m_mainFrame->view()->forceLayout(); // scroll to restore current screen center - if (node) { + if (node && node->inDocument()) { const WebCore::IntRect& newBounds = node->getRect(); DBG_NAV_LOGD("nb:(x=%d,y=%d,w=%d," "h=%d)", newBounds.x(), newBounds.y(), |
