Title: [140058] trunk/Source/WebCore
Revision
140058
Author
e...@webkit.org
Date
2013-01-17 15:21:25 -0800 (Thu, 17 Jan 2013)

Log Message

The threaded html parser hangs when parsing empty documents (and about:blank)
https://bugs.webkit.org/show_bug.cgi?id=107160

Reviewed by Tony Gentilcore.

This is covered by many existing tests including the html5lib suite.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140057 => 140058)


--- trunk/Source/WebCore/ChangeLog	2013-01-17 23:17:24 UTC (rev 140057)
+++ trunk/Source/WebCore/ChangeLog	2013-01-17 23:21:25 UTC (rev 140058)
@@ -1,3 +1,15 @@
+2013-01-17  Eric Seidel  <e...@webkit.org>
+
+        The threaded html parser hangs when parsing empty documents (and about:blank)
+        https://bugs.webkit.org/show_bug.cgi?id=107160
+
+        Reviewed by Tony Gentilcore.
+
+        This is covered by many existing tests including the html5lib suite.
+
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::finish):
+
 2013-01-17  Alexis Hetu  <su...@chromium.org>
 
         imageSmoothingEnabled frequent, unpredictable crashes

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (140057 => 140058)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-17 23:17:24 UTC (rev 140057)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-17 23:21:25 UTC (rev 140058)
@@ -575,7 +575,10 @@
 void HTMLDocumentParser::finish()
 {
 #if ENABLE(THREADED_HTML_PARSER)
-    if (shouldUseThreading()) {
+    // Empty documents never got an append() call, and thus have never started
+    // a background parser. In those cases, we ignore shouldUseThreading()
+    // and fall through to the non-threading case.
+    if (shouldUseThreading() && m_haveBackgroundParser) {
         HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::finishPartial, ParserMap::identifierForParser(this)));
         return;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to