Title: [144240] trunk/Source/WebCore
Revision
144240
Author
[email protected]
Date
2013-02-27 14:39:19 -0800 (Wed, 27 Feb 2013)

Log Message

Threaded HTML Parser fails fast/dom/HTMLAnchorElement/anchor-no-multiple-windows.html in debug
https://bugs.webkit.org/show_bug.cgi?id=110951

Reviewed by Eric Seidel.

We were triggering this ASSERT because we didn't understand that a
given frame might have multiple DocumentLoaders in various states. That
caused us to think that a DocumentLoader in the provisional state was
actually loading.

* dom/Document.cpp:
(WebCore::Document::decrementActiveParserCount):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoading):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144239 => 144240)


--- trunk/Source/WebCore/ChangeLog	2013-02-27 22:24:23 UTC (rev 144239)
+++ trunk/Source/WebCore/ChangeLog	2013-02-27 22:39:19 UTC (rev 144240)
@@ -1,3 +1,20 @@
+2013-02-27  Adam Barth  <[email protected]>
+
+        Threaded HTML Parser fails fast/dom/HTMLAnchorElement/anchor-no-multiple-windows.html in debug
+        https://bugs.webkit.org/show_bug.cgi?id=110951
+
+        Reviewed by Eric Seidel.
+
+        We were triggering this ASSERT because we didn't understand that a
+        given frame might have multiple DocumentLoaders in various states. That
+        caused us to think that a DocumentLoader in the provisional state was
+        actually loading.
+
+        * dom/Document.cpp:
+        (WebCore::Document::decrementActiveParserCount):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::isLoading):
+
 2013-02-27  Chris Fleizach  <[email protected]>
 
         AX: Mac platform should support ability to scroll an element into visible

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (144239 => 144240)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2013-02-27 22:24:23 UTC (rev 144239)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2013-02-27 22:39:19 UTC (rev 144240)
@@ -133,6 +133,13 @@
     return 0;
 }
 
+Document* DocumentLoader::document() const
+{
+    if (m_frame && m_frame->loader()->documentLoader() == this)
+        return m_frame->document();
+    return 0;
+}
+
 const ResourceRequest& DocumentLoader::originalRequest() const
 {
     return m_originalRequest;
@@ -284,7 +291,7 @@
     // http/tests/security/feed-urls-from-remote.html to timeout on Mac WK1
     // see http://webkit.org/b/110554 and http://webkit.org/b/110401
 #if ENABLE(THREADED_HTML_PARSER)
-    if (m_frame && m_frame->document() && m_frame->document()->hasActiveParser())
+    if (document() && document()->hasActiveParser())
         return true;
 #endif
     return isLoadingMainResource() || !m_subresourceLoaders.isEmpty() || !m_plugInStreamLoaders.isEmpty();

Modified: trunk/Source/WebCore/loader/DocumentLoader.h (144239 => 144240)


--- trunk/Source/WebCore/loader/DocumentLoader.h	2013-02-27 22:24:23 UTC (rev 144239)
+++ trunk/Source/WebCore/loader/DocumentLoader.h	2013-02-27 22:39:19 UTC (rev 144240)
@@ -85,6 +85,7 @@
         PassRefPtr<ResourceBuffer> mainResourceData() const;
         
         DocumentWriter* writer() const { return &m_writer; }
+        Document* document() const;
 
         const ResourceRequest& originalRequest() const;
         const ResourceRequest& originalRequestCopy() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to