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

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

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compile issue Created 5 years, 11 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: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 494e626632747c47732fd85919edf1c039b0c49f..42afc34feadad9a77fce0a28becff2709a8bc364 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -530,6 +530,10 @@ void HTMLDocumentParser::pumpPendingSpeculations()
SpeculationsPumpSession session(m_pumpSpeculationsSessionNestingLevel, contextForParsingSession());
while (!m_speculations.isEmpty()) {
ASSERT(!isScheduledForResume());
+
+ if (m_parserScheduler->yieldIfNeeded(session, m_speculations.first()->startingScript))
Sami 2015/01/26 18:07:41 I wonder if we should move this yield point in a s
alex clarke (OOO till 29th) 2015/01/27 11:41:19 Done.
+ break;
+
size_t elementTokenCount = processParsedChunkFromBackgroundParser(m_speculations.takeFirst());
session.addedElementTokens(elementTokenCount);
@@ -539,9 +543,6 @@ void HTMLDocumentParser::pumpPendingSpeculations()
// which invokes nested event loops. (e.g. inspector breakpoints)
if (!isParsing() || isWaitingForScripts() || isScheduledForResume())
break;
-
- if (m_speculations.isEmpty() || m_parserScheduler->yieldIfNeeded(session, m_speculations.first()->startingScript))
- break;
}
TRACE_EVENT_END1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ParseHTML", "endLine", lineNumber().zeroBasedInt());

Powered by Google App Engine
This is Rietveld 408576698