Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
index ed5d3592f20c47ae3ecd43aa377039fe2f1c5f45..20960c46ec5a2edb8915bdbc199616621f286455 100644 |
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
@@ -573,7 +573,9 @@ void HTMLDocumentParser::forcePlaintextForTextDocument() |
if (!m_haveBackgroundParser) |
startBackgroundParser(); |
- postTaskToLookaheadParser(Asynchronous, &BackgroundHTMLParser::forcePlaintextForTextDocument, m_backgroundParser); |
+ // This task should be synchronous, because otherwise synchronous |
+ // tokenizing can happen before plaintext is forced. |
kouhei (in TOK)
2016/08/09 23:54:02
Would you note this in CL description too?
|
+ postTaskToLookaheadParser(Synchronous, &BackgroundHTMLParser::forcePlaintextForTextDocument, m_backgroundParser); |
} else |
m_tokenizer->setState(HTMLTokenizer::PLAINTEXTState); |
} |