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

Unified Diff: Source/platform/ThreadTimers.cpp

Issue 1087203002: Patch 2/3 to get WebScheduler via WebThread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Style nits Created 5 years, 8 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 | « Source/core/html/parser/HTMLParserScheduler.cpp ('k') | Source/platform/WebScheduler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/ThreadTimers.cpp
diff --git a/Source/platform/ThreadTimers.cpp b/Source/platform/ThreadTimers.cpp
index e6cbcf064336741194fc24295aa89daa114d2961..7755ce23fa36753e9c8c842322975703fc504039 100644
--- a/Source/platform/ThreadTimers.cpp
+++ b/Source/platform/ThreadTimers.cpp
@@ -31,7 +31,8 @@
#include "platform/SharedTimer.h"
#include "platform/Timer.h"
#include "platform/TraceEvent.h"
-#include "platform/scheduler/Scheduler.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebScheduler.h"
#include "wtf/CurrentTime.h"
#include "wtf/MainThread.h"
@@ -136,7 +137,8 @@ void ThreadTimers::sharedTimerFiredInternal()
timer.fired();
// Catch the case where the timer asked timers to fire in a nested event loop, or we are over time limit.
- if (!m_firingTimers || timeToQuit < monotonicallyIncreasingTime() || (isMainThread() && Scheduler::shared()->shouldYieldForHighPriorityWork()))
+ if (!m_firingTimers || timeToQuit < monotonicallyIncreasingTime()
+ || (isMainThread() && Platform::current()->currentThread()->scheduler()->shouldYieldForHighPriorityWork()))
break;
}
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.cpp ('k') | Source/platform/WebScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698