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

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)

Created:
3 years, 7 months ago by tzik
Modified:
3 years, 7 months ago
CC:
chromium-reviews, kinuko+worker_chromium.org, blink-reviews-html_chromium.org, Raymond Toy, sof, eae+blinkwatch, Justin Novosad, shimazu+worker_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, Rik, dshwang, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, hongchan, scheduler-bugs_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use WTF::TimeDelta to specify delays on WebTaskRunner WebTaskRunner had 3 variants of PostTask to post a delayed task. And among that, one takes a double for the delay parameter, and others takes a long long. While most of other parts of Blink uses double for a time delta in milliseconds or seconds. That is sometimes confusing. This CL replaces the type of delay parameter of WebTaskRunner with WTF::TimeDelta, which is an alias of base::TimeDelta, and updates all callers. Plus, this removes an overload of PostTask that has only one caller in the production. Review-Url: https://codereview.chromium.org/2876513002 Cr-Commit-Position: refs/heads/master@{#470931} Committed: https://chromium.googlesource.com/chromium/src/+/3c84cbfc6e50987a39ee77140bdbb124970e6c58

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase. WTF::TimeDelta -> TimeDelta #

Patch Set 3 : mac fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -128 lines) Patch
M third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/Timer.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunner.h View 1 4 chunks +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunner.cpp View 1 3 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunnerTest.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/WebThreadSupportingGC.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/audio/PushPullFIFOMultithreadTest.cpp View 1 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc View 1 8 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc View 1 23 chunks +80 lines, -53 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.h View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (18 generated)
tzik
PTAL to: alexclarke: WebTaskRunner and scheduler. haraken: others as an OWNER. nhiroki: FYI.
3 years, 7 months ago (2017-05-10 13:07:32 UTC) #6
alex clarke (OOO till 29th)
Nice LGTM
3 years, 7 months ago (2017-05-10 13:12:44 UTC) #7
kinuko
nice! (lgtm)
3 years, 7 months ago (2017-05-10 14:24:03 UTC) #10
haraken
LGTM https://codereview.chromium.org/2876513002/diff/1/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp File third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp (right): https://codereview.chromium.org/2876513002/diff/1/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp#newcode120 third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp:120: WTF::TimeDelta::FromMilliseconds(timeout_millis)); WTF:: wouldn't be needed.
3 years, 7 months ago (2017-05-10 15:12:54 UTC) #11
Sami
lgtm. It's a little unfortunate that we need to add ToSingleThreadTaskRunner() in a few places, ...
3 years, 7 months ago (2017-05-10 15:30:10 UTC) #13
nhiroki
lgtm!
3 years, 7 months ago (2017-05-10 23:29:02 UTC) #14
tzik
https://codereview.chromium.org/2876513002/diff/1/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp File third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp (right): https://codereview.chromium.org/2876513002/diff/1/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp#newcode120 third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp:120: WTF::TimeDelta::FromMilliseconds(timeout_millis)); On 2017/05/10 15:12:54, haraken wrote: > > WTF:: ...
3 years, 7 months ago (2017-05-11 07:15:18 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2876513002/20001
3 years, 7 months ago (2017-05-11 07:16:02 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/416108)
3 years, 7 months ago (2017-05-11 07:48:40 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2876513002/40001
3 years, 7 months ago (2017-05-11 10:15:51 UTC) #26
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 12:27:29 UTC) #29
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/3c84cbfc6e50987a39ee77140bdb...

Powered by Google App Engine
This is Rietveld 408576698