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

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

Issue 1422233002: Revert of BackgroundHTMLParser: Introduce ParsedChunkQueue to pass ParsedChunks to main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 74f0f30bdb5f048b0135cdf23e15c268375587c6..8d08984b220477899accd7d6207abfca35eaf9f4 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
@@ -107,7 +107,6 @@
, m_preloadScanner(config->preloadScanner.release())
, m_decoder(config->decoder.release())
, m_loadingTaskRunner(loadingTaskRunner)
- , m_parsedChunkQueue(config->parsedChunkQueue)
, m_startingScript(false)
{
ASSERT(m_outstandingTokenLimit > 0);
@@ -178,7 +177,6 @@
m_input.rewindTo(checkpoint->inputCheckpoint, checkpoint->unparsedInput);
m_preloadScanner->rewindTo(checkpoint->preloadScannerCheckpoint);
m_startingScript = false;
- m_parsedChunkQueue->clear();
pumpTokenizer();
}
@@ -293,12 +291,9 @@
chunk->startingScript = m_startingScript;
m_startingScript = false;
- bool isEmpty = m_parsedChunkQueue->enqueue(chunk.release());
- if (isEmpty) {
- m_loadingTaskRunner->postTask(
- BLINK_FROM_HERE,
- new Task(threadSafeBind(&HTMLDocumentParser::notifyPendingParsedChunks, AllowCrossThreadAccess(m_parser))));
- }
+ m_loadingTaskRunner->postTask(
+ BLINK_FROM_HERE,
+ new Task(threadSafeBind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser, AllowCrossThreadAccess(m_parser), chunk.release())));
m_pendingTokens = adoptPtr(new CompactHTMLTokenStream);
}

Powered by Google App Engine
This is Rietveld 408576698