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

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

Issue 2223223002: [ParseHTMLOnMainThread] Force plaintext synchronously on lookahead parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add layout test Created 4 years, 4 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698