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

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

Issue 656463004: Use the scheduling mechanism provided by the platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased + moved v8 to new interface. 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
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 0ef764d72dfd6938a2a8037a8ac49af17154a3ca..ceff03996408e09d1e579ae1f5d9517b86101c63 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -44,6 +44,8 @@
#include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
#include "platform/scheduler/Scheduler.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebScheduler.h"
#include "public/platform/WebThreadedDataReceiver.h"
#include "wtf/Functional.h"
@@ -516,7 +518,7 @@ void HTMLDocumentParser::pumpPendingSpeculations()
if (isStopped() || isWaitingForScripts())
break;
- if ((Scheduler::shared()->shouldYieldForHighPriorityWork() || currentTime() - startTime > parserTimeLimit) && !m_speculations.isEmpty()) {
+ if (((Platform::current()->scheduler() && Platform::current()->scheduler()->shouldYieldForHighPriorityWork()) || currentTime() - startTime > parserTimeLimit) && !m_speculations.isEmpty()) {
m_parserScheduler->scheduleForResume();
break;
}

Powered by Google App Engine
This is Rietveld 408576698