Fix for the doc-write-before-end.pl layout test running with ThreadedParserDataReceiver disabled.
Fix for the doc-write-before-end.pl layout test running with ThreadedParserDataReceiver disabled.

If document.close() is called in an event handler while there's still chunks of the main document coming in from the network, DocumentLoader::commitData() would throw an assert, as document.close() turns off the the m_isParsing flag in the Document and commitData() asserts on the flag being set. This patch changes the assert into an early return instead; there should be a better way to fix this by turning off the resource load when the parser is detached by document.close(), but this has proven tricky to pull off without side-effects.

This hasn't been apparent before now as the ThreadedParserDataReceiver feature got turned on on the waterfall before the document.close() call got added to the doc-write-before-end.pl layout test.

BUG=

Review URL: https://codereview.chromium.org/873553002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@188920 bbb929c8-8fbe-4397-9dbb-9b2b20218538

XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk