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) |