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

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: iframe onload works and isnt flaky in either direction 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ postTaskToLookaheadParser(Synchronous, &BackgroundHTMLParser::forcePlaintextForTextDocument, m_backgroundParser);
} else
m_tokenizer->setState(HTMLTokenizer::PLAINTEXTState);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698