Title: [116556] trunk/Source/WebKit/chromium
Revision
116556
Author
[email protected]
Date
2012-05-09 14:17:35 -0700 (Wed, 09 May 2012)

Log Message

[chromium] Check whether an active document loader exists before accessing it
https://bugs.webkit.org/show_bug.cgi?id=85892

Reviewed by Eric Seidel.

Although FrameLoader::loadInSameDocument which invokes this
method does not have a provisional document loader, we're seeing crashes
where the FrameLoader is in provisional state, and thus
activeDocumentLoader returns 0. Lacking any understanding of how this
can happen, we do this check here to avoid crashing.

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (116555 => 116556)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-09 21:06:23 UTC (rev 116555)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-09 21:17:35 UTC (rev 116556)
@@ -1,3 +1,19 @@
+2012-05-09  Jochen Eisinger  <[email protected]>
+
+        [chromium] Check whether an active document loader exists before accessing it
+        https://bugs.webkit.org/show_bug.cgi?id=85892
+
+        Reviewed by Eric Seidel.
+
+        Although FrameLoader::loadInSameDocument which invokes this
+        method does not have a provisional document loader, we're seeing crashes
+        where the FrameLoader is in provisional state, and thus
+        activeDocumentLoader returns 0. Lacking any understanding of how this
+        can happen, we do this check here to avoid crashing.
+
+        * src/FrameLoaderClientImpl.cpp:
+        (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
+
 2012-05-09  Ian Vollick  <[email protected]>
 
         [chromium] Add impl-thread support for fill-mode and direction css animation properties

Modified: trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (116555 => 116556)


--- trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2012-05-09 21:06:23 UTC (rev 116555)
+++ trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2012-05-09 21:17:35 UTC (rev 116556)
@@ -635,8 +635,14 @@
     // didStopLoading only when loader is completed so that we don't fire
     // them for fragment redirection that happens in window.onload handler.
     // See https://bugs.webkit.org/show_bug.cgi?id=31838
-    bool loaderCompleted =
-        !webView->page()->mainFrame()->loader()->activeDocumentLoader()->isLoadingInAPISense();
+    //
+    // FIXME: Although FrameLoader::loadInSameDocument which invokes this
+    // method does not have a provisional document loader, we're seeing crashes
+    // where the FrameLoader is in provisional state, and thus
+    // activeDocumentLoader returns 0. Lacking any understanding of how this
+    // can happen, we do this check here to avoid crashing.
+    FrameLoader* loader = webView->page()->mainFrame()->loader();
+    bool loaderCompleted = !(loader->activeDocumentLoader() && loader->activeDocumentLoader()->isLoadingInAPISense());
 
     // Generate didStartLoading if loader is completed.
     if (webView->client() && loaderCompleted)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to