summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Baard <henrik.baard@sonyericsson.com>2010-08-17 07:54:16 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-17 07:54:16 -0700
commitcfddf9ccc414ba4b5ebea868d80d8daba7bc726a (patch)
tree9b5ef1b90cb7aeea71a3754c2606f8d49a425820
parent55094dcb36140213cd67c1f77b4180e694d4f7c2 (diff)
parent3c54ece08a0ea9e5dc5d5788a4c49c8dc94b501f (diff)
downloadexternal_webkit-cfddf9ccc414ba4b5ebea868d80d8daba7bc726a.zip
external_webkit-cfddf9ccc414ba4b5ebea868d80d8daba7bc726a.tar.gz
external_webkit-cfddf9ccc414ba4b5ebea868d80d8daba7bc726a.tar.bz2
am 3c54ece0: am 5dc34a85: activeDocumentLoader() causes crash in WebCoreFrameBridge.cpp
Merge commit '3c54ece08a0ea9e5dc5d5788a4c49c8dc94b501f' * commit '3c54ece08a0ea9e5dc5d5788a4c49c8dc94b501f': activeDocumentLoader() causes crash in WebCoreFrameBridge.cpp
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index 10c8439..868233a 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -532,7 +532,12 @@ WebFrame::loadStarted(WebCore::Frame* frame)
#ifdef ANDROID_INSTRUMENT
TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
- const WebCore::KURL& url = frame->loader()->activeDocumentLoader()->url();
+ // activeDocumentLoader() can return null.
+ DocumentLoader* documentLoader = frame->loader()->activeDocumentLoader();
+ if (documentLoader == NULL)
+ return;
+
+ const WebCore::KURL& url = documentLoader->url();
if (url.isEmpty())
return;
LOGV("::WebCore:: loadStarted %s", url.string().ascii().data());
@@ -598,8 +603,14 @@ WebFrame::didFinishLoad(WebCore::Frame* frame)
TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = getJNIEnv();
+
+ // activeDocumentLoader() can return null.
WebCore::FrameLoader* loader = frame->loader();
- const WebCore::KURL& url = loader->activeDocumentLoader()->url();
+ DocumentLoader* documentLoader = loader->activeDocumentLoader();
+ if (documentLoader == NULL)
+ return;
+
+ const WebCore::KURL& url = documentLoader->url();
if (url.isEmpty())
return;
LOGV("::WebCore:: didFinishLoad %s", url.string().ascii().data());