|
|
DescriptionMark OnceCallback::Run() & const so it matches a const callback object.
BUG=675328
Committed: https://crrev.com/3f2fd66ee3c869dbf43bf3c44877406ecfd871f3
Cr-Commit-Position: refs/heads/master@{#439938}
Patch Set 1 #
Messages
Total messages: 17 (12 generated)
The CQ bit was checked by dcheng@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...
dcheng@chromium.org changed reviewers: + vmpstr@chromium.org
Before, it'd just complain that neither of the two Run() overloads matched: ../../base/bind_unittest.cc:1420:6: error: no matching member function for call to 'Run' cb.Run(); ~~~^~~ ../../base/callback.h:44:5: note: candidate function not viable: no known conversion from 'const OnceClosure' (aka 'const base::Callback<void (), b ase::internal::CopyMode::MoveOnly, base::internal::RepeatMode::Once>') to 'base::internal::RunMixin<base::Callback<void (), base::internal::CopyMod e::MoveOnly, base::internal::RepeatMode::Once> >' for object argument R Run(Args... args) & { ^ ../../base/callback.h:60:5: note: candidate function not viable: no known conversion from 'const OnceClosure' (aka 'const base::Callback<void (), b ase::internal::CopyMode::MoveOnly, base::internal::RepeatMode::Once>') to 'base::internal::RunMixin<base::Callback<void (), base::internal::CopyMod e::MoveOnly, base::internal::RepeatMode::Once> >' for object argument R Run(Args... args) && { Now it does this: In file included from ../../base/bind_unittest.cc:5: In file included from ../../base/bind.h:8: In file included from ../../base/bind_internal.h:13: In file included from ../../base/bind_helpers.h:168: ../../base/callback.h:55:5: error: static_assert failed "OnceCallback::Run() may only be invoked on a non-const rvalue, i.e. std::move(callback).Run()." static_assert(!IsOnceCallback<CallbackType>::value, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../base/bind_unittest.cc:1420:6: note: in instantiation of member function 'base::internal::RunMixin<base::Callback<void (), base::internal::Cop yMode::MoveOnly, base::internal::RepeatMode::Once> >::Run' requested here cb.Run(); Which I hope is an improvement. I kind of want to remove the i.e. clause, but I'm not sure if it's overall helpful or not.
Description was changed from ========== Mark OnecCallback::Run() & const so it matches a const callback object. BUG=675328 ========== to ========== Mark OnceCallback::Run() & const so it matches a const callback object. BUG=675328 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm, the error is much better! thanks
The CQ bit was checked by dcheng@chromium.org
The CQ bit was unchecked by dcheng@chromium.org
The CQ bit was checked by dcheng@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": 1, "attempt_start_ts": 1482261320232790, "parent_rev": "b4354f89134609ece3a3b7ab7094e2807d4c2ffa", "commit_rev": "7c31c198cc4007d29f3dde608e88f648c64da3f1"}
Message was sent while issue was closed.
Description was changed from ========== Mark OnceCallback::Run() & const so it matches a const callback object. BUG=675328 ========== to ========== Mark OnceCallback::Run() & const so it matches a const callback object. BUG=675328 Review-Url: https://codereview.chromium.org/2583343002 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Mark OnceCallback::Run() & const so it matches a const callback object. BUG=675328 Review-Url: https://codereview.chromium.org/2583343002 ========== to ========== Mark OnceCallback::Run() & const so it matches a const callback object. BUG=675328 Committed: https://crrev.com/3f2fd66ee3c869dbf43bf3c44877406ecfd871f3 Cr-Commit-Position: refs/heads/master@{#439938} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/3f2fd66ee3c869dbf43bf3c44877406ecfd871f3 Cr-Commit-Position: refs/heads/master@{#439938} |