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

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

Issue 634983003: Yield HTMLDocumentParser for high priority tasks in blink scheduler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index cf2aed090d9cbbb4d40c836eab576e588d10d507..685c097b8cf1fb27461a4d1928709f01009f1a6e 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -43,6 +43,7 @@
#include "core/loader/DocumentLoader.h"
#include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
+#include "platform/scheduler/Scheduler.h"
#include "public/platform/WebThreadedDataReceiver.h"
#include "wtf/Functional.h"
@@ -536,7 +537,7 @@ void HTMLDocumentParser::pumpPendingSpeculations()
if (isStopped() || isWaitingForScripts())
break;
- if (currentTime() - startTime > parserTimeLimit && !m_speculations.isEmpty()) {
+ if ((Scheduler::shared()->shouldYieldForHighPriorityWork() || currentTime() - startTime > parserTimeLimit) && !m_speculations.isEmpty()) {
m_parserScheduler->scheduleForResume();
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698