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

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

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: 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..40e0e945b0ab6459d346c10ffbde37e2ca0bf216 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);
+ WTF::TimeDelta::FromMilliseconds(timeout_millis));
haraken 2017/05/10 15:12:54 WTF:: wouldn't be needed.
tzik 2017/05/11 07:15:18 Done.
+ }
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