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

Issue 2034633002: Decouple Invoker from BindState (Closed)

Created:
4 years, 6 months ago by tzik
Modified:
4 years, 5 months ago
Reviewers:
Nico, Yuta Kitamura, dcheng
CC:
chromium-reviews, danakj
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple Invoker from BindState Move most of type-level logic out of BindState, and decouple Invoker from BindState. So that we can use BindState with another Invoker impl. - UnboundRunType calculation is moved to a separate helper template as MakeUnboundRuntype. - Indices generation to extract tuple is moved from BindState to Invoker. - WeakPtr handling is moved from BindState to Invoker. This is a preparation CL as well to implement a OneShot variant of Callback. That will share the same Callback and BindState impl with different Invoker::Run impl and different Callback tag as Copyable Callback and MoveOnly Callback have. BUG=554299 Committed: https://crrev.com/caf1d84bb83aaf5369eb508027a685e2bf9859b4 Cr-Commit-Position: refs/heads/master@{#402446}

Patch Set 1 #

Patch Set 2 : +comment. Remove InvokeOneShot for now. #

Patch Set 3 : fix #

Patch Set 4 : attempt to avoid MSVC failure #

Patch Set 5 : fix #

Patch Set 6 : attempt2 #

Patch Set 7 : attempt3 #

Patch Set 8 : comment fix #

Patch Set 9 : inline for size bloat #

Patch Set 10 : more inline #

Total comments: 7

Patch Set 11 : comment fix. s/static inline/inline/. #

Patch Set 12 : rebase #

Total comments: 4

Patch Set 13 : rebase #

Patch Set 14 : update #

Total comments: 4

Patch Set 15 : revert IsWeakMethod<> change #

Patch Set 16 : remove base::internal::MakeUnboundRunType #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -123 lines) Patch
M base/bind.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -24 lines 0 comments Download
M base/bind_helpers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -4 lines 0 comments Download
M base/bind_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +52 lines, -40 lines 0 comments Download
M base/callback.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -16 lines 0 comments Download
M base/callback_unittest.cc View 2 chunks +14 lines, -39 lines 0 comments Download

Messages

Total messages: 37 (20 generated)
tzik
PTAL
4 years, 6 months ago (2016-06-02 15:58:23 UTC) #12
Nico
generally looks good https://codereview.chromium.org/2034633002/diff/180001/base/bind.h File base/bind.h (right): https://codereview.chromium.org/2034633002/diff/180001/base/bind.h#newcode53 base/bind.h:53: static inline base::Callback<MakeUnboundRunType<Functor, Args...>> (looks like ...
4 years, 6 months ago (2016-06-02 17:27:44 UTC) #13
tzik
https://codereview.chromium.org/2034633002/diff/180001/base/bind_internal.h File base/bind_internal.h (right): https://codereview.chromium.org/2034633002/diff/180001/base/bind_internal.h#newcode302 base/bind_internal.h:302: static inline ReturnType MakeItSo(Runnable&& runnable, RunArgs&&... args) { On ...
4 years, 6 months ago (2016-06-02 19:09:06 UTC) #14
dcheng
It looks like thakis@ already reviewed this pretty thoroughly. My only comment is if we ...
4 years, 6 months ago (2016-06-03 04:48:40 UTC) #15
tzik
https://codereview.chromium.org/2034633002/diff/180001/base/bind_helpers.h File base/bind_helpers.h (right): https://codereview.chromium.org/2034633002/diff/180001/base/bind_helpers.h#newcode568 base/bind_helpers.h:568: // A type-level function that extracts return type of ...
4 years, 6 months ago (2016-06-03 13:29:52 UTC) #18
tzik
Adding yutak@, who refactored WTF::bind() recently.
4 years, 6 months ago (2016-06-21 14:58:30 UTC) #20
Yuta Kitamura
LGTM with nits, though I'm not a pro of base::Bind. https://codereview.chromium.org/2034633002/diff/220001/base/bind_internal.h File base/bind_internal.h (right): https://codereview.chromium.org/2034633002/diff/220001/base/bind_internal.h#newcode356 ...
4 years, 6 months ago (2016-06-23 07:22:45 UTC) #21
tzik
https://codereview.chromium.org/2034633002/diff/220001/base/bind_internal.h File base/bind_internal.h (right): https://codereview.chromium.org/2034633002/diff/220001/base/bind_internal.h#newcode356 base/bind_internal.h:356: constexpr size_t num_bound_args = On 2016/06/23 07:22:45, Yuta Kitamura ...
4 years, 6 months ago (2016-06-23 08:16:10 UTC) #22
tzik
dcheng, thakis: Any chance to take another look?
4 years, 6 months ago (2016-06-23 15:13:40 UTC) #23
dcheng
https://codereview.chromium.org/2034633002/diff/260001/base/bind.h File base/bind.h (right): https://codereview.chromium.org/2034633002/diff/260001/base/bind.h#newcode50 base/bind.h:50: using MakeUnboundRunType = internal::MakeUnboundRunType<Functor, Args...>; Nit: It seems a ...
4 years, 5 months ago (2016-06-27 07:57:22 UTC) #24
tzik
https://codereview.chromium.org/2034633002/diff/260001/base/bind.h File base/bind.h (right): https://codereview.chromium.org/2034633002/diff/260001/base/bind.h#newcode50 base/bind.h:50: using MakeUnboundRunType = internal::MakeUnboundRunType<Functor, Args...>; On 2016/06/27 07:57:22, dcheng ...
4 years, 5 months ago (2016-06-27 08:43:11 UTC) #25
dcheng
LGTM
4 years, 5 months ago (2016-06-28 07:28:16 UTC) #26
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/2034633002/300001
4 years, 5 months ago (2016-06-28 08:57:37 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/236593)
4 years, 5 months ago (2016-06-28 11:18:42 UTC) #31
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/2034633002/300001
4 years, 5 months ago (2016-06-28 11:26:24 UTC) #33
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 5 months ago (2016-06-28 12:22:41 UTC) #35
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 12:25:33 UTC) #37
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/caf1d84bb83aaf5369eb508027a685e2bf9859b4
Cr-Commit-Position: refs/heads/master@{#402446}

Powered by Google App Engine
This is Rietveld 408576698