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

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)

Created:
4 years, 2 months ago by tzik
Modified:
4 years, 2 months ago
CC:
chromium-reviews, sadrul, robliao+watch_chromium.org, fdoray+watch_chromium.org, blink-reviews, gab+watch_chromium.org, scheduler-bugs_chromium.org, Sami
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace base::Callback with base::OnceCallback in base::PendingTask After this CL, PendingTask holds the posted task as OnceClosure. And to do that, PendingTasks get non-const on a task invocation, due to the mutation the posted task for the consumption by the task invocation. BUG=554299 Committed: https://crrev.com/739ffe3fd7b83bcb9ef7eb2e4b5c52fdbf35f59d Cr-Commit-Position: refs/heads/master@{#425318}

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : rebase #

Patch Set 4 : fix #

Patch Set 5 : fix #

Patch Set 6 : cros fix #

Patch Set 7 : test fix (will refine later) #

Patch Set 8 : revert most of task_scheduler changes #

Total comments: 12

Patch Set 9 : rebase onto fdoray's http://crrev.com/2399213005 #

Patch Set 10 : rebase #

Total comments: 2

Patch Set 11 : move UnsafeConvertOnceClosureToRepeating #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -41 lines) Patch
M base/debug/task_annotator.h View 1 chunk +1 line, -1 line 0 comments Download
M base/debug/task_annotator.cc View 1 chunk +11 lines, -13 lines 0 comments Download
M base/debug/task_annotator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop/message_loop.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -7 lines 0 comments Download
M base/message_loop/message_pump_perftest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/pending_task.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -4 lines 0 comments Download
M base/pending_task.cc View 2 chunks +4 lines, -6 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M base/threading/worker_pool_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/threading/worker_pool_win.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/timers/alarm_timer_chromeos.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 60 (47 generated)
fdoray
https://codereview.chromium.org/2386653002/diff/140001/base/bind.h File base/bind.h (right): https://codereview.chromium.org/2386653002/diff/140001/base/bind.h#newcode86 base/bind.h:86: BASE_EXPORT internal::RepeatingClosure UnsafeConvertOnceClosureToRepeating( Do you plan to use OnceClosure ...
4 years, 2 months ago (2016-10-06 17:37:23 UTC) #29
tzik
Adding owners for review. PTAL to: dcheng: //base, fdoray: //base/task_scheduler and overall, derat: //components/timers, alexclarke: ...
4 years, 2 months ago (2016-10-13 05:58:04 UTC) #39
alex clarke (OOO till 29th)
Interesting! I suspect the majority of closures posted do run at most once, so I ...
4 years, 2 months ago (2016-10-13 09:01:31 UTC) #42
tzik
On 2016/10/13 09:01:31, alex clarke wrote: > Interesting! I suspect the majority of closures posted ...
4 years, 2 months ago (2016-10-13 09:09:23 UTC) #43
alex clarke (OOO till 29th)
On 2016/10/13 09:09:23, tzik wrote: > On 2016/10/13 09:01:31, alex clarke wrote: > > Interesting! ...
4 years, 2 months ago (2016-10-13 09:11:38 UTC) #44
fdoray
lgtm
4 years, 2 months ago (2016-10-13 13:58:34 UTC) #45
Daniel Erat
lgtm for components/timers/alarm_timer_chromeos.cc
4 years, 2 months ago (2016-10-13 18:02:54 UTC) #46
dcheng
https://codereview.chromium.org/2386653002/diff/200001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2386653002/diff/200001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode325 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:325: base::UnsafeConvertOnceClosureToRepeating( Can we just define UnsafeConvert directly here instead ...
4 years, 2 months ago (2016-10-14 02:35:02 UTC) #47
tzik
https://codereview.chromium.org/2386653002/diff/200001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2386653002/diff/200001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode325 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:325: base::UnsafeConvertOnceClosureToRepeating( On 2016/10/14 02:35:02, dcheng wrote: > Can we ...
4 years, 2 months ago (2016-10-14 05:07:43 UTC) #50
dcheng
lgtm
4 years, 2 months ago (2016-10-14 05:24:32 UTC) #51
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/2386653002/220001
4 years, 2 months ago (2016-10-14 14:28:54 UTC) #56
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 2 months ago (2016-10-14 14:35:24 UTC) #58
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 14:39:38 UTC) #60
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/739ffe3fd7b83bcb9ef7eb2e4b5c52fdbf35f59d
Cr-Commit-Position: refs/heads/master@{#425318}

Powered by Google App Engine
This is Rietveld 408576698