Title: [143407] trunk/Source/WebCore
- Revision
- 143407
- Author
- to...@chromium.org
- Date
- 2013-02-19 16:35:51 -0800 (Tue, 19 Feb 2013)
Log Message
Disable ASSERT(!hasInsertionPoint()) for background parser
https://bugs.webkit.org/show_bug.cgi?id=110251
Reviewed by Adam Barth.
The background parser crashes about 10 layout tests by hitting ASSERT(!hasInsertionPoint()).
Now, finish() is the thing that closes the HTMLInputStream which removes the insertion point.
In these tests, a document.open() calls insert() which clears the HTMLInputStream which causes
there to be an insertion point again.
With the main thread parser, insert() is called before finish() so the ASSERT passes.
However, with the threaded parser, finish() is called before insert(), so we fail the ASSERT.
This patch disables the ASSERT for the background parser because m_input isn't really relevant.
This causes us to pass the tests. However, there is a risk that now hasInsertionPoint() may be incorrect
and Document has a non-debug branch that tests hasInsertionPoint().
No new tests because covered by existing tests.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (143406 => 143407)
--- trunk/Source/WebCore/ChangeLog 2013-02-20 00:34:16 UTC (rev 143406)
+++ trunk/Source/WebCore/ChangeLog 2013-02-20 00:35:51 UTC (rev 143407)
@@ -1,3 +1,28 @@
+2013-02-19 Tony Gentilcore <to...@chromium.org>
+
+ Disable ASSERT(!hasInsertionPoint()) for background parser
+ https://bugs.webkit.org/show_bug.cgi?id=110251
+
+ Reviewed by Adam Barth.
+
+ The background parser crashes about 10 layout tests by hitting ASSERT(!hasInsertionPoint()).
+ Now, finish() is the thing that closes the HTMLInputStream which removes the insertion point.
+ In these tests, a document.open() calls insert() which clears the HTMLInputStream which causes
+ there to be an insertion point again.
+
+ With the main thread parser, insert() is called before finish() so the ASSERT passes.
+ However, with the threaded parser, finish() is called before insert(), so we fail the ASSERT.
+
+ This patch disables the ASSERT for the background parser because m_input isn't really relevant.
+ This causes us to pass the tests. However, there is a risk that now hasInsertionPoint() may be incorrect
+ and Document has a non-debug branch that tests hasInsertionPoint().
+
+ No new tests because covered by existing tests.
+
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::prepareToStopParsing):
+ (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
+
2013-02-19 Simon Fraser <simon.fra...@apple.com>
Separate constraining for overhang from fixed-position zooming behavior in scrollOffsetForFixedPosition()
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (143406 => 143407)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-02-20 00:34:16 UTC (rev 143406)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-02-20 00:35:51 UTC (rev 143407)
@@ -157,7 +157,9 @@
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end
void HTMLDocumentParser::prepareToStopParsing()
{
- ASSERT(!hasInsertionPoint());
+ // FIXME: It may not be correct to disable this for the background parser.
+ // That means hasInsertionPoint() may not be correct in some cases.
+ ASSERT(!hasInsertionPoint() || m_haveBackgroundParser);
// pumpTokenizer can cause this parser to be detached from the Document,
// but we need to ensure it isn't deleted yet.
@@ -644,7 +646,9 @@
void HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd()
{
ASSERT(isStopping());
- ASSERT(!hasInsertionPoint());
+ // FIXME: It may not be correct to disable this for the background parser.
+ // That means hasInsertionPoint() may not be correct in some cases.
+ ASSERT(!hasInsertionPoint() || m_haveBackgroundParser);
if (m_scriptRunner && !m_scriptRunner->executeScriptsWaitingForParsing())
return;
end();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes