Title: [139959] trunk/Source/WebCore
- Revision
- 139959
- Author
- to...@chromium.org
- Date
- 2013-01-16 20:35:43 -0800 (Wed, 16 Jan 2013)
Log Message
Disable an ASSERT for the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=107087
Reviewed by Adam Barth.
Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state.
The background parser has minimal code to update its tokenizer's state properly.
No new tests because covered by existing fast/parser tests.
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/HTMLParserOptions.h:
(HTMLParserOptions):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139958 => 139959)
--- trunk/Source/WebCore/ChangeLog 2013-01-17 04:22:41 UTC (rev 139958)
+++ trunk/Source/WebCore/ChangeLog 2013-01-17 04:35:43 UTC (rev 139959)
@@ -1,3 +1,22 @@
+2013-01-16 Tony Gentilcore <to...@chromium.org>
+
+ Disable an ASSERT for the threaded parser
+ https://bugs.webkit.org/show_bug.cgi?id=107087
+
+ Reviewed by Adam Barth.
+
+ Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state.
+ The background parser has minimal code to update its tokenizer's state properly.
+
+ No new tests because covered by existing fast/parser tests.
+
+ * html/parser/HTMLParserOptions.cpp:
+ (WebCore::HTMLParserOptions::HTMLParserOptions):
+ * html/parser/HTMLParserOptions.h:
+ (HTMLParserOptions):
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processEndTag):
+
2013-01-16 MORITA Hajime <morr...@google.com>
Attr.ownerDocument should change if its parent's owner did
Modified: trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp (139958 => 139959)
--- trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp 2013-01-17 04:22:41 UTC (rev 139958)
+++ trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp 2013-01-17 04:35:43 UTC (rev 139959)
@@ -42,6 +42,8 @@
usePreHTML5ParserQuirks = settings && settings->usePreHTML5ParserQuirks();
#if ENABLE(THREADED_HTML_PARSER)
useThreading = settings && settings->threadedHTMLParser();
+#else
+ useThreading = false;
#endif
maximumDOMTreeDepth = settings ? settings->maximumHTMLParserDOMTreeDepth() : Settings::defaultMaximumHTMLParserDOMTreeDepth;
}
Modified: trunk/Source/WebCore/html/parser/HTMLParserOptions.h (139958 => 139959)
--- trunk/Source/WebCore/html/parser/HTMLParserOptions.h 2013-01-17 04:22:41 UTC (rev 139958)
+++ trunk/Source/WebCore/html/parser/HTMLParserOptions.h 2013-01-17 04:35:43 UTC (rev 139959)
@@ -35,9 +35,7 @@
bool scriptEnabled;
bool pluginsEnabled;
bool usePreHTML5ParserQuirks;
-#if ENABLE(THREADED_HTML_PARSER)
bool useThreading;
-#endif
unsigned maximumDOMTreeDepth;
explicit HTMLParserOptions(Document*);
Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (139958 => 139959)
--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-01-17 04:22:41 UTC (rev 139958)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-01-17 04:35:43 UTC (rev 139959)
@@ -2157,7 +2157,7 @@
// self-closing script tag was encountered and pre-HTML5 parser
// quirks are enabled. We must set the tokenizer's state to
// DataState explicitly if the tokenizer didn't have a chance to.
- ASSERT(m_parser->tokenizer()->state() == HTMLTokenizerState::DataState || m_options.usePreHTML5ParserQuirks);
+ ASSERT(m_parser->tokenizer()->state() == HTMLTokenizerState::DataState || m_options.usePreHTML5ParserQuirks || m_options.useThreading);
m_parser->tokenizer()->setState(HTMLTokenizerState::DataState);
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes