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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: mac fix Created 3 years, 7 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 | third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
index 4bf57730b022d2e5f6899ae160f34e14f3a42f02..03d6eedefebbd2e00481ade771e190b7d0bffe90 100644
--- a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
@@ -112,12 +112,13 @@ ScriptedIdleTaskController::RegisterCallback(
BLINK_FROM_HERE,
WTF::Bind(&internal::IdleRequestCallbackWrapper::IdleTaskFired,
callback_wrapper));
- if (timeout_millis > 0)
+ if (timeout_millis > 0) {
scheduler_->TimerTaskRunner()->PostDelayedTask(
BLINK_FROM_HERE,
WTF::Bind(&internal::IdleRequestCallbackWrapper::TimeoutFired,
callback_wrapper),
- timeout_millis);
+ TimeDelta::FromMilliseconds(timeout_millis));
+ }
TRACE_EVENT_INSTANT1("devtools.timeline", "RequestIdleCallback",
TRACE_EVENT_SCOPE_THREAD, "data",
InspectorIdleCallbackRequestEvent::Data(
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698