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

Unified Diff: third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc

Issue 2319053004: [Reland] Make canceling Timers fast. (Closed)
Patch Set: Rebased Created 4 years, 3 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: third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc b/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
index 0329940d95df321f056efbbb1fbeba7d0daaf04c..348f71d34f7a9f8a478ef43d6ec09df6529e8ed6 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
@@ -36,6 +36,14 @@ void WebTaskRunnerImpl::postDelayedTask(const blink::WebTraceLocation& location,
base::TimeDelta::FromMillisecondsD(delayMs));
}
+void WebTaskRunnerImpl::postDelayedTask(const WebTraceLocation& location,
+ const base::Closure& task,
+ double delayMs) {
+ DCHECK_GE(delayMs, 0.0);
+ task_queue_->PostDelayedTask(location, task,
+ base::TimeDelta::FromMillisecondsD(delayMs));
+}
+
bool WebTaskRunnerImpl::runsTasksOnCurrentThread() {
return task_queue_->RunsTasksOnCurrentThread();
}

Powered by Google App Engine
This is Rietveld 408576698