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

Issue 2353913005: Add WebTaskRunner::postCancellableTask (Closed)

Created:
4 years, 3 months ago by tzik
Modified:
4 years, 1 month ago
CC:
chromium-reviews, blink-reviews, dglazkov+blink, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add WebTaskRunner::postCancellableTask This CL introduces WebTaskRunner::postCancellableTask, that returns TaskHandle. The caller can use TaskHandle to check if the task is already run, and to cancel the invocation. This should replace CancellableTaskFactory, makeCancellable, and zero-delay Timer. BUG= Committed: https://crrev.com/3ee9fc49731407879d63cf5c2304934d737e9e77 Cr-Commit-Position: refs/heads/master@{#428982}

Patch Set 1 #

Patch Set 2 : simplify #

Patch Set 3 : +EXPORT #

Patch Set 4 : fix #

Patch Set 5 : move to a separate file #

Patch Set 6 : win fix #

Patch Set 7 : back to PS4. rebase. #

Patch Set 8 : fix #

Patch Set 9 : +comment #

Patch Set 10 : +test #

Total comments: 27

Patch Set 11 : . #

Total comments: 21

Patch Set 12 : fix #

Patch Set 13 : . #

Total comments: 13

Patch Set 14 : +DISALLOW_COPY_AND_ASSIGN. +WARN_UNUSED_RETURN. #

Patch Set 15 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -12 lines) Patch
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunner.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +83 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/WebTaskRunnerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +76 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +51 lines, -11 lines 0 comments Download
M third_party/WebKit/public/platform/WebTaskRunner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +48 lines, -0 lines 0 comments Download

Messages

Total messages: 96 (58 generated)
tzik
PTAL. As an alternative of WTF::makeCancellable, can we integrate it to WebTaskRunner::postTask()? This is similar ...
4 years, 3 months ago (2016-09-21 06:09:10 UTC) #9
dcheng
On 2016/09/21 06:09:10, tzik wrote: > PTAL. > > As an alternative of WTF::makeCancellable, can ...
4 years, 3 months ago (2016-09-21 06:17:14 UTC) #12
alex clarke (OOO till 29th)
On 2016/09/21 06:17:14, dcheng wrote: > On 2016/09/21 06:09:10, tzik wrote: > > PTAL. > ...
4 years, 3 months ago (2016-09-21 10:33:42 UTC) #17
haraken
On 2016/09/21 10:33:42, alex clarke wrote: > On 2016/09/21 06:17:14, dcheng wrote: > > On ...
4 years, 3 months ago (2016-09-21 12:38:46 UTC) #18
haraken
On 2016/09/21 12:38:46, haraken wrote: > On 2016/09/21 10:33:42, alex clarke wrote: > > On ...
4 years, 3 months ago (2016-09-23 04:52:58 UTC) #19
dcheng
On 2016/09/23 04:52:58, haraken wrote: > On 2016/09/21 12:38:46, haraken wrote: > > On 2016/09/21 ...
4 years, 3 months ago (2016-09-23 07:41:04 UTC) #20
Sami
So after chatting with haraken@ and tzik@ (and alexclarke@ earlier) I think we're now all ...
4 years, 2 months ago (2016-10-13 04:22:44 UTC) #30
haraken
On 2016/10/13 04:22:44, Sami (slow -- traveling) wrote: > So after chatting with haraken@ and ...
4 years, 2 months ago (2016-10-13 04:24:27 UTC) #31
dcheng
On 2016/10/13 04:24:27, haraken wrote: > On 2016/10/13 04:22:44, Sami (slow -- traveling) wrote: > ...
4 years, 2 months ago (2016-10-13 04:34:12 UTC) #32
Sami
On 2016/10/13 04:34:12, dcheng wrote: > Sorry, I was hoping we'd be able to chat ...
4 years, 2 months ago (2016-10-13 04:44:10 UTC) #33
dcheng
On 2016/10/13 04:44:10, Sami (slow -- traveling) wrote: > On 2016/10/13 04:34:12, dcheng wrote: > ...
4 years, 2 months ago (2016-10-13 05:02:54 UTC) #34
Sami
On 2016/10/13 05:02:54, dcheng wrote: > Anything with a delay is generally largely arbitrary, whether ...
4 years, 2 months ago (2016-10-13 05:16:33 UTC) #35
haraken
On 2016/10/13 05:16:33, Sami (slow -- traveling) wrote: > On 2016/10/13 05:02:54, dcheng wrote: > ...
4 years, 2 months ago (2016-10-13 05:28:17 UTC) #36
Sami
Notes from our meeting: - Let's go with postCancellableTask \o/ - Let's add a nice ...
4 years, 2 months ago (2016-10-14 01:11:08 UTC) #41
haraken
tzik@: Is PS8 ready for final review?
4 years, 2 months ago (2016-10-17 09:19:08 UTC) #42
tzik
On 2016/10/17 09:19:08, haraken wrote: > tzik@: Is PS8 ready for final review? Added a ...
4 years, 2 months ago (2016-10-18 04:44:07 UTC) #45
haraken
On 2016/10/18 04:44:07, tzik wrote: > On 2016/10/17 09:19:08, haraken wrote: > > tzik@: Is ...
4 years, 2 months ago (2016-10-18 19:14:03 UTC) #48
tzik
On 2016/10/18 19:14:03, haraken wrote: > On 2016/10/18 04:44:07, tzik wrote: > > On 2016/10/17 ...
4 years, 2 months ago (2016-10-19 14:41:24 UTC) #51
haraken
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: class TaskHandle::ClearOnScopeOut { Sorry, would you help me understand ...
4 years, 2 months ago (2016-10-19 15:20:40 UTC) #52
alex clarke (OOO till 29th)
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode32 third_party/WebKit/Source/platform/WebTaskRunner.cpp:32: std::unique_ptr<WTF::Closure> task = std::move(m_task); Is there any reason to ...
4 years, 2 months ago (2016-10-19 15:36:46 UTC) #53
tzik
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: class TaskHandle::ClearOnScopeOut { On 2016/10/19 15:20:39, haraken wrote: > ...
4 years, 2 months ago (2016-10-19 20:46:47 UTC) #56
dcheng
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode32 third_party/WebKit/Source/platform/WebTaskRunner.cpp:32: std::unique_ptr<WTF::Closure> task = std::move(m_task); On 2016/10/19 20:46:47, tzik wrote: ...
4 years, 2 months ago (2016-10-19 22:21:47 UTC) #57
haraken
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: class TaskHandle::ClearOnScopeOut { On 2016/10/19 20:46:47, tzik wrote: > ...
4 years, 2 months ago (2016-10-20 09:42:46 UTC) #58
tzik
https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/180001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: class TaskHandle::ClearOnScopeOut { On 2016/10/20 09:42:46, haraken wrote: > ...
4 years, 2 months ago (2016-10-20 16:15:12 UTC) #61
haraken
LGTM https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode11 third_party/WebKit/Source/platform/WebTaskRunner.cpp:11: // possible circular references in a case below: ...
4 years, 2 months ago (2016-10-20 17:07:37 UTC) #64
dcheng
https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: // This class holds a reference to a TaskHandle ...
4 years, 2 months ago (2016-10-21 06:14:46 UTC) #65
tzik
https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/200001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode9 third_party/WebKit/Source/platform/WebTaskRunner.cpp:9: // This class holds a reference to a TaskHandle ...
4 years, 1 month ago (2016-10-25 07:03:52 UTC) #70
dcheng
https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode60 third_party/WebKit/Source/platform/WebTaskRunner.cpp:60: cancel(); This call looks a bit interesting, because cancel() ...
4 years, 1 month ago (2016-10-26 01:58:54 UTC) #74
Sami
I think the API looks great now. https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode39 third_party/WebKit/Source/platform/WebTaskRunner.cpp:39: RefPtr<TaskHandle> m_handle; ...
4 years, 1 month ago (2016-10-26 12:32:51 UTC) #75
alex clarke (OOO till 29th)
https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode22 third_party/WebKit/Source/platform/WebTaskRunner.cpp:22: // CancelOnTaskDestruction is needed to break the circle by ...
4 years, 1 month ago (2016-10-26 12:40:42 UTC) #76
tzik
https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode22 third_party/WebKit/Source/platform/WebTaskRunner.cpp:22: // CancelOnTaskDestruction is needed to break the circle by ...
4 years, 1 month ago (2016-10-27 06:38:53 UTC) #79
dcheng
lgtm
4 years, 1 month ago (2016-10-27 08:13:34 UTC) #82
alex clarke (OOO till 29th)
lgtm https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp File third_party/WebKit/Source/platform/WebTaskRunner.cpp (right): https://codereview.chromium.org/2353913005/diff/240001/third_party/WebKit/Source/platform/WebTaskRunner.cpp#newcode22 third_party/WebKit/Source/platform/WebTaskRunner.cpp:22: // CancelOnTaskDestruction is needed to break the circle ...
4 years, 1 month ago (2016-10-27 09:46:37 UTC) #83
tzik
Sami: ping. Any other concern on this?
4 years, 1 month ago (2016-11-01 09:29:39 UTC) #88
Sami
My apologies, I thought I already gave my lgtm. Thanks for pushing this through :)
4 years, 1 month ago (2016-11-01 10:48:48 UTC) #89
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/2353913005/280001
4 years, 1 month ago (2016-11-01 11:55:18 UTC) #92
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 1 month ago (2016-11-01 11:59:15 UTC) #94
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 12:01:25 UTC) #96
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/3ee9fc49731407879d63cf5c2304934d737e9e77
Cr-Commit-Position: refs/heads/master@{#428982}

Powered by Google App Engine
This is Rietveld 408576698