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

Unified Diff: Source/platform/scheduler/Scheduler.cpp

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed the idle implementation Created 5 years, 9 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/platform/scheduler/Scheduler.cpp
diff --git a/Source/platform/scheduler/Scheduler.cpp b/Source/platform/scheduler/Scheduler.cpp
index bdd1f196543842399f5a2bd26cfc5b5fa07cbae2..a823a0b4806f06e87cd1da7538120c91395dd637 100644
--- a/Source/platform/scheduler/Scheduler.cpp
+++ b/Source/platform/scheduler/Scheduler.cpp
@@ -8,6 +8,7 @@
#include "public/platform/Platform.h"
#include "public/platform/WebScheduler.h"
#include "public/platform/WebTraceLocation.h"
+#include "wtf/MainThread.h"
namespace blink {
@@ -86,6 +87,14 @@ void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas
m_webScheduler->postLoadingTask(location, task);
}
+void Scheduler::postTimerTask(const WebTraceLocation& location, WebThread::Task* task, long long delayMs)
+{
+ ASSERT(WTF::isMainThread());
+
+ if (m_webScheduler)
+ m_webScheduler->postTimerTask(location, task, delayMs);
+}
+
bool Scheduler::shouldYieldForHighPriorityWork() const
{
if (m_webScheduler)

Powered by Google App Engine
This is Rietveld 408576698