Title: [144027] trunk/Source/WebCore
Revision
144027
Author
[email protected]
Date
2013-02-26 01:57:33 -0800 (Tue, 26 Feb 2013)

Log Message

Threaded HTML parser fails fast/loader/stateobjects/state-attribute-history-getter.html
https://bugs.webkit.org/show_bug.cgi?id=110801

Reviewed by Adam Barth.

This causes 6 more tests to pass for the threaded parser,
an solves all of our timeout issues.

These tests which were failing were racy, we just were never
hitting the race due to using file urls.  This change fixes
the threaded parser to emulate one more of the EOF quirks from
the loader/main-thread-parser interaction.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144026 => 144027)


--- trunk/Source/WebCore/ChangeLog	2013-02-26 09:47:57 UTC (rev 144026)
+++ trunk/Source/WebCore/ChangeLog	2013-02-26 09:57:33 UTC (rev 144027)
@@ -1,3 +1,21 @@
+2013-02-26  Eric Seidel  <[email protected]>
+
+        Threaded HTML parser fails fast/loader/stateobjects/state-attribute-history-getter.html
+        https://bugs.webkit.org/show_bug.cgi?id=110801
+
+        Reviewed by Adam Barth.
+
+        This causes 6 more tests to pass for the threaded parser,
+        an solves all of our timeout issues.
+
+        These tests which were failing were racy, we just were never
+        hitting the race due to using file urls.  This change fixes
+        the threaded parser to emulate one more of the EOF quirks from
+        the loader/main-thread-parser interaction.
+
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
+
 2013-02-26  Alexander Pavlov  <[email protected]>
 
         Web Inspector: CSSAgent.setStyleSheetText crashes on inline styles

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (144026 => 144027)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-02-26 09:47:57 UTC (rev 144026)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-02-26 09:57:33 UTC (rev 144027)
@@ -383,8 +383,14 @@
             break;
 
         if (!isParsingFragment()
-            && document()->frame() && document()->frame()->navigationScheduler()->locationChangePending())
+            && document()->frame() && document()->frame()->navigationScheduler()->locationChangePending()) {
+
+            // To match main-thread parser behavior (which never checks locationChangePending on the EOF path)
+            // we peek to see if this chunk has an EOF and process it anyway.
+            if (tokens->last().type() == HTMLToken::EndOfFile)
+                prepareToStopParsing();
             break;
+        }
 
         if (isWaitingForScripts()) {
             ASSERT(it + 1 == tokens->end()); // The </script> is assumed to be the last token of this bunch.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to