Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1125)

Unified Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 133173003: The HTML parser should ignore incoming bytes when stopped, not just when detached. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index ff73092b2cbfbcead0f72a109aa85434652e03d4..84c9197c309a3f36d5ee241d57a959ea31b771b2 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -659,6 +659,7 @@ void HTMLDocumentParser::insert(const SegmentedString& source)
void HTMLDocumentParser::startBackgroundParser()
{
+ ASSERT(!isStopped());
ASSERT(shouldUseThreading());
ASSERT(!m_haveBackgroundParser);
m_haveBackgroundParser = true;
@@ -964,7 +965,7 @@ void HTMLDocumentParser::resumeScheduledTasks()
void HTMLDocumentParser::appendBytes(const char* data, size_t length)
{
- if (!length || isDetached())
+ if (!length || isStopped())
return;
if (shouldUseThreading()) {
@@ -996,6 +997,7 @@ void HTMLDocumentParser::flush()
void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder)
{
+ ASSERT(decoder);
DecodedDataDocumentParser::setDecoder(decoder);
if (m_haveBackgroundParser)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698