summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/CachedFramePlatformDataAndroid.h2
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp15
2 files changed, 14 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/CachedFramePlatformDataAndroid.h b/WebKit/android/WebCoreSupport/CachedFramePlatformDataAndroid.h
index ac22d05..20c7be4 100644
--- a/WebKit/android/WebCoreSupport/CachedFramePlatformDataAndroid.h
+++ b/WebKit/android/WebCoreSupport/CachedFramePlatformDataAndroid.h
@@ -60,4 +60,4 @@ private:
}
-#endif \ No newline at end of file
+#endif
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index 250ffc9..c7f9eca 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -529,7 +529,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());
@@ -595,8 +600,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());