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

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

Issue 1772853002: Block the HTML parser on external stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified parser blocking logic Created 4 years, 9 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/BackgroundHTMLParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
index 0a7c3688b52f8c0b873f4f5ab1e1e3ece8243b56..642606c82a9c707fa8df3b18a53306daaa2312be 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
@@ -260,7 +260,10 @@ void BackgroundHTMLParser::pumpTokenizer()
m_token->clear();
- if (simulatedToken == HTMLTreeBuilderSimulator::ScriptEnd || m_pendingTokens->size() >= m_pendingTokenLimit) {
+ if (simulatedToken == HTMLTreeBuilderSimulator::ScriptEnd
+ || simulatedToken == HTMLTreeBuilderSimulator::StyleEnd
+ || simulatedToken == HTMLTreeBuilderSimulator::LinkToken
+ || m_pendingTokens->size() >= m_pendingTokenLimit) {
sendTokensToMainThread();
// If we're far ahead of the main thread, yield for a bit to avoid consuming too much memory.
if (m_input.totalCheckpointTokenCount() > m_outstandingTokenLimit)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698