Disable ASSERT(!hasInsertionPoint()) for background parser
authortonyg@chromium.org <tonyg@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 00:35:51 +0000 (00:35 +0000)
committertonyg@chromium.org <tonyg@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 00:35:51 +0000 (00:35 +0000)
commitf07f737cdd845f6aba5353192c3dedc53c624a83
tree9c14dbd95c098fdd4ffeb34445c0748ed82cfa73
parentb234a0fa3804d3aab016ec19b709bbdbd9682eba
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLDocumentParser.cpp