Title: [105220] branches/safari-534.54-branch/Source/WebCore
Revision
105220
Author
lforsch...@apple.com
Date
2012-01-17 17:23:06 -0800 (Tue, 17 Jan 2012)

Log Message

Merge 104593.

Modified Paths


Diff

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (105219 => 105220)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-18 01:18:20 UTC (rev 105219)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-18 01:23:06 UTC (rev 105220)
@@ -1,5 +1,24 @@
 2011-1-17  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 104593
+
+    2012-01-10  Brady Eidson  <beid...@apple.com>
+
+            <rdar://problem/9328684> and https://bugs.webkit.org/show_bug.cgi?id=62764
+            Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
+
+            Reviewed by Maciej Stachowiak.
+
+            This is a non-reproducible high volume crash, so no test :(. 
+
+            * loader/DocumentLoader.cpp:
+            (WebCore::DocumentLoader::stopLoading): Don't re-run actual "stop loading" logic if the document loader is already
+              stopping loading. Also add an ASSERT that might catch cases where new loads may have been started while old loads
+              were being stopped.
+            (WebCore::DocumentLoader::detachFromFrame): Be conservative and stop loading when we detach a document loader from a frame. 
+
+2011-1-17  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 97303
 
     2011-10-12  Chris Fleizach  <cfleiz...@apple.com>

Modified: branches/safari-534.54-branch/Source/WebCore/loader/DocumentLoader.cpp (105219 => 105220)


--- branches/safari-534.54-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-01-18 01:18:20 UTC (rev 105219)
+++ branches/safari-534.54-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-01-18 01:23:06 UTC (rev 105220)
@@ -237,8 +237,18 @@
     m_applicationCacheHost->stopLoadingInFrame(m_frame);
 #endif
 
-    if (!loading)
+    if (!loading) {
+        // If something above restarted loading we might run into mysterious crashes like 
+        // https://bugs.webkit.org/show_bug.cgi?id=62764 and <rdar://problem/9328684>
+        ASSERT(!m_loading);
         return;
+    }
+
+    // We might run in to infinite recursion if we're stopping loading as the result of 
+    // detaching from the frame, so break out of that recursion here.
+    // See <rdar://problem/9673866> for more details.
+    if (m_isStopping)
+        return;
     
     RefPtr<Frame> protectFrame(m_frame);
     RefPtr<DocumentLoader> protectLoader(this);
@@ -400,9 +410,11 @@
 {
     ASSERT(m_frame);
 
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+    // It never makes sense to have a document loader that is detached from its
+    // frame have any loads active, so go ahead and kill all the loads.
+    stopLoading();
+
     m_applicationCacheHost->setDOMApplicationCache(0);
-#endif
     m_frame = 0;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to