|
|
DescriptionUse OnceCallback on Mojo interfaces in //device/gamepad
This CL flips `use_once_calback` flag on the Mojo code generator, and
fixes all compile errors after it. After this CL, Mojo interfaces in
//device/gamepad starts using base::OnceCallback instead of
base::Callback on its return value handling.
The migration recipe was:
- Convert pass-by-ref callback objects to pass-by-value.
- Use std::move() to forward it to other consumer, or to invoke it
with Callback::Run().
- Handle wherever copies are required manually.
- Check if the conversion doesn't change the semantics. As the transfer
and invocation clobber the callback object, care about use-after-move.
It's considered safe to consume almost scoped-out callback.
BUG=714018
Review-Url: https://codereview.chromium.org/2872563002
Cr-Commit-Position: refs/heads/master@{#471779}
Committed: https://chromium.googlesource.com/chromium/src/+/d9b1d7c05d1d18606bad0a0ebfb75e7240c4b5e1
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : rebase #
Messages
Total messages: 38 (28 generated)
The CQ bit was checked by tzik@chromium.org to run a CQ dry run
The CQ bit was checked by tzik@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
Description was changed from ========== Use OnceCallback on Mojo interfaces in //device/gamepad ========== to ========== Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad starts using base::OnceCallback instead of base::Callback on its return value handling. The migration recipe was: - Convert pass-by-ref callback objects to pass-by-value. - Use std::move() to forward it to other consumer, or to invoke it with Callback::Run(). - Handle wherever copies are required manually. - Check if the conversion doesn't change the semantics. As the transfer and invocation clobber the callback object, care about use-after-move. It's considered safe to consume almost scoped-out callback. BUG=714018 ==========
The CQ bit was checked by tzik@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad starts using base::OnceCallback instead of base::Callback on its return value handling. The migration recipe was: - Convert pass-by-ref callback objects to pass-by-value. - Use std::move() to forward it to other consumer, or to invoke it with Callback::Run(). - Handle wherever copies are required manually. - Check if the conversion doesn't change the semantics. As the transfer and invocation clobber the callback object, care about use-after-move. It's considered safe to consume almost scoped-out callback. BUG=714018 ========== to ========== Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad starts using base::OnceCallback instead of base::Callback on its return value handling. The migration recipe was: - Convert pass-by-ref callback objects to pass-by-value. - Use std::move() to forward it to other consumer, or to invoke it with Callback::Run(). - Handle wherever copies are required manually. - Check if the conversion doesn't change the semantics. As the transfer and invocation clobber the callback object, care about use-after-move. It's considered safe to consume almost scoped-out callback. BUG=714018 ==========
tzik@chromium.org changed reviewers: + scottmg@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by tzik@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tzik@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
The CQ bit was checked by tzik@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
tzik@chromium.org changed reviewers: + dcheng@chromium.org
Adding dcheng as a SECURITY_OWNER for gamepad_struct_traits_unittest.cc review. PTAL.
LGTM
The CQ bit was checked by tzik@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
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_...)
The CQ bit was checked by tzik@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1494858440892210, "parent_rev": "fee7ccc76fd2955ebc0b949174f283ee8ed41d24", "commit_rev": "d9b1d7c05d1d18606bad0a0ebfb75e7240c4b5e1"}
Message was sent while issue was closed.
Description was changed from ========== Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad starts using base::OnceCallback instead of base::Callback on its return value handling. The migration recipe was: - Convert pass-by-ref callback objects to pass-by-value. - Use std::move() to forward it to other consumer, or to invoke it with Callback::Run(). - Handle wherever copies are required manually. - Check if the conversion doesn't change the semantics. As the transfer and invocation clobber the callback object, care about use-after-move. It's considered safe to consume almost scoped-out callback. BUG=714018 ========== to ========== Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad starts using base::OnceCallback instead of base::Callback on its return value handling. The migration recipe was: - Convert pass-by-ref callback objects to pass-by-value. - Use std::move() to forward it to other consumer, or to invoke it with Callback::Run(). - Handle wherever copies are required manually. - Check if the conversion doesn't change the semantics. As the transfer and invocation clobber the callback object, care about use-after-move. It's considered safe to consume almost scoped-out callback. BUG=714018 Review-Url: https://codereview.chromium.org/2872563002 Cr-Commit-Position: refs/heads/master@{#471779} Committed: https://chromium.googlesource.com/chromium/src/+/d9b1d7c05d1d18606bad0a0ebfb7... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/d9b1d7c05d1d18606bad0a0ebfb7... |