Title: [203723] trunk/Source/WebCore
Revision
203723
Author
[email protected]
Date
2016-07-26 09:29:06 -0700 (Tue, 26 Jul 2016)

Log Message

ASSERTION FAILED: !m_frame->page()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame)
https://bugs.webkit.org/show_bug.cgi?id=160193

Reviewed by Michael Catanzaro.

This is happening in the GTK+ Debug bot when running test loader/load-defer.html (note that the assert is inside
a !USE(CF) block).
The test is creating an iframe with load deferred, then in a timeout it disables the deferred load and checks
that the load actually happens. What happens is that the initial empty document is what calls
DocumentLoader::finishedLoading() when load is still deferred. The onload handler is not called because load
events are disabled for the initial empty document in SubframeLoader::loadSubframe(), but
DocumentLoader::finishedLoading() is called unconditionally from maybeLoadEmpty(). I think it's fine to call
DocumentLoader::finishedLoading() for the initial empty document even when load is deferred, so we can simply
update the assert to handle that case.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading): Do not assert if called for the initial empty document when load is
deferred.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203722 => 203723)


--- trunk/Source/WebCore/ChangeLog	2016-07-26 16:26:54 UTC (rev 203722)
+++ trunk/Source/WebCore/ChangeLog	2016-07-26 16:29:06 UTC (rev 203723)
@@ -1,3 +1,24 @@
+2016-07-26  Carlos Garcia Campos  <[email protected]>
+
+        ASSERTION FAILED: !m_frame->page()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame)
+        https://bugs.webkit.org/show_bug.cgi?id=160193
+
+        Reviewed by Michael Catanzaro.
+
+        This is happening in the GTK+ Debug bot when running test loader/load-defer.html (note that the assert is inside
+        a !USE(CF) block).
+        The test is creating an iframe with load deferred, then in a timeout it disables the deferred load and checks
+        that the load actually happens. What happens is that the initial empty document is what calls
+        DocumentLoader::finishedLoading() when load is still deferred. The onload handler is not called because load
+        events are disabled for the initial empty document in SubframeLoader::loadSubframe(), but
+        DocumentLoader::finishedLoading() is called unconditionally from maybeLoadEmpty(). I think it's fine to call
+        DocumentLoader::finishedLoading() for the initial empty document even when load is deferred, so we can simply
+        update the assert to handle that case.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::finishedLoading): Do not assert if called for the initial empty document when load is
+        deferred.
+
 2016-07-26  Youenn Fablet  <[email protected]>
 
         Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (203722 => 203723)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2016-07-26 16:26:54 UTC (rev 203722)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2016-07-26 16:29:06 UTC (rev 203723)
@@ -398,7 +398,7 @@
     // There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
     // See <rdar://problem/6304600> for more details.
 #if !USE(CF)
-    ASSERT(!m_frame->page()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame));
+    ASSERT(!m_frame->page()->defersLoading() || frameLoader()->stateMachine().creatingInitialEmptyDocument() || InspectorInstrumentation::isDebuggerPaused(m_frame));
 #endif
 
     Ref<DocumentLoader> protectedThis(*this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to