Title: [140209] trunk/Source/WebCore
Revision
140209
Author
to...@chromium.org
Date
2013-01-18 14:34:28 -0800 (Fri, 18 Jan 2013)

Log Message

Run defer scripts in the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=107320

Reviewed by Eric Seidel.

No new tests because covered by http/tests/misc/script-defer.html.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140208 => 140209)


--- trunk/Source/WebCore/ChangeLog	2013-01-18 22:21:22 UTC (rev 140208)
+++ trunk/Source/WebCore/ChangeLog	2013-01-18 22:34:28 UTC (rev 140209)
@@ -1,3 +1,16 @@
+2013-01-18  Tony Gentilcore  <to...@chromium.org>
+
+        Run defer scripts in the threaded HTML parser
+        https://bugs.webkit.org/show_bug.cgi?id=107320
+
+        Reviewed by Eric Seidel.
+
+        No new tests because covered by http/tests/misc/script-defer.html.
+
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::prepareToStopParsing):
+        (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
+
 2013-01-18  Robert Hogan  <rob...@webkit.org>
 
         fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html is crashing after r140024

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (140208 => 140209)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-18 22:21:22 UTC (rev 140208)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-18 22:34:28 UTC (rev 140209)
@@ -148,7 +148,8 @@
 
     // NOTE: This pump should only ever emit buffered character tokens,
     // so ForceSynchronous vs. AllowYield should be meaningless.
-    pumpTokenizerIfPossible(ForceSynchronous);
+    if (!shouldUseThreading())
+        pumpTokenizerIfPossible(ForceSynchronous);
     
     if (isStopped())
         return;
@@ -298,9 +299,7 @@
         // attemptToEnd() instead.
         if (it->type() == HTMLTokenTypes::EndOfFile) {
             ASSERT(it + 1 == tokens.end()); // The EOF is assumed to be the last token of this bunch.
-            DocumentParser::prepareToStopParsing();
-            document()->setReadyState(Document::Interactive);
-            end();
+            prepareToStopParsing();
             return;
         }
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to