|
|
DescriptionAdd Callback::IsCancelled
Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr
invalidation.
Committed: https://crrev.com/59aa6bb1162b31d2af31c4a235c67826687b6b28
Cr-Commit-Position: refs/heads/master@{#417248}
Patch Set 1 #Patch Set 2 : +test #Patch Set 3 : update #Patch Set 4 : +comment #
Total comments: 5
Patch Set 5 : rebase #Patch Set 6 : return false on IsCancelled() on empty callbacks #Patch Set 7 : update comment #Patch Set 8 : revert to PS5 #
Depends on Patchset: Messages
Total messages: 60 (42 generated)
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: Exceeded global retry quota
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: linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
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 ========== Add Callback::IsCancelled BUG= ========== to ========== Add Callback::IsCancelled TODO: Check the impact to the binary size. * Stripped binary size on Linux + gold -> +140kB * same + lld -> +440kB * win, mac, android? BUG= ==========
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...
Description was changed from ========== Add Callback::IsCancelled TODO: Check the impact to the binary size. * Stripped binary size on Linux + gold -> +140kB * same + lld -> +440kB * win, mac, android? BUG= ========== to ========== Add Callback::IsCancelled BUG= ==========
Description was changed from ========== Add Callback::IsCancelled BUG= ========== to ========== Add Callback::IsCancelled TODO: description BUG= ==========
tzik@chromium.org changed reviewers: + alexclarke@chromium.org, dcheng@chromium.org, yutak@chromium.org
Description was changed from ========== Add Callback::IsCancelled TODO: description BUG= ========== to ========== Add Callback::IsCancelled TODO: description & doc comment BUG= ==========
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 ========== Add Callback::IsCancelled TODO: description & doc comment BUG= ========== to ========== Add Callback::IsCancelled Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr invalidation. ==========
PTAL
This has the functionality I'd like, and it's significantly simpler than the methods I was considering for doing this :) On an official build what's the binary size delta for Android?
lgtm
On 2016/09/07 09:13:12, alex clarke wrote: > This has the functionality I'd like, and it's significantly simpler than the > methods I was considering for doing this :) > > On an official build what's the binary size delta for Android? The size delta of this CL is +41672 bytes on ChromePublic.apk, which is ~0.07%, and the total delta of other CLs is +25268 bytes.
On 2016/09/07 11:04:47, tzik wrote: > On 2016/09/07 09:13:12, alex clarke wrote: > > This has the functionality I'd like, and it's significantly simpler than the > > methods I was considering for doing this :) > > > > On an official build what's the binary size delta for Android? > > The size delta of this CL is +41672 bytes on ChromePublic.apk, which is ~0.07%, > and the total delta of other CLs is +25268 bytes. Good that's tiny. LGTM
On 2016/09/07 11:06:20, alex clarke wrote: > On 2016/09/07 11:04:47, tzik wrote: > > On 2016/09/07 09:13:12, alex clarke wrote: > > > This has the functionality I'd like, and it's significantly simpler than the > > > methods I was considering for doing this :) > > > > > > On an official build what's the binary size delta for Android? > > > > The size delta of this CL is +41672 bytes on ChromePublic.apk, which is > ~0.07%, > > and the total delta of other CLs is +25268 bytes. > > Good that's tiny. > > LGTM I mean this CL;s delta is tiny :)
On 2016/09/07 11:04:47, tzik wrote: > On 2016/09/07 09:13:12, alex clarke wrote: > > This has the functionality I'd like, and it's significantly simpler than the > > methods I was considering for doing this :) > > > > On an official build what's the binary size delta for Android? > > The size delta of this CL is +41672 bytes on ChromePublic.apk, which is ~0.07%, > and the total delta of other CLs is +25268 bytes. master: 57457059 bytes http://crrev.com/2317563002: 57440251 bytes (delta: -16808) http://crrev.com/2310093003: 57440655 bytes (delta: -16404) this CL: 57482327 bytes (delta: +25268)
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...
https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc File base/callback_internal.cc (right): https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... base/callback_internal.cc:41: DCHECK(bind_state_); Can we do this instead of the DCHECK? if (!bind_state_) return false;
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc File base/callback_internal.cc (right): https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... base/callback_internal.cc:41: DCHECK(bind_state_); On 2016/09/07 15:53:53, alex clarke wrote: > Can we do this instead of the DCHECK? > > if (!bind_state_) > return false; If there's a null callback posted to the task queue, we'll explode anyway when we try to Run() it. So DCHECKing seems fine to me.
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...
https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc File base/callback_internal.cc (right): https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... base/callback_internal.cc:41: DCHECK(bind_state_); On 2016/09/07 21:40:27, dcheng wrote: > On 2016/09/07 15:53:53, alex clarke wrote: > > Can we do this instead of the DCHECK? > > > > if (!bind_state_) > > return false; > > If there's a null callback posted to the task queue, we'll explode anyway when > we try to Run() it. So DCHECKing seems fine to me. Hmm, right, it doesn't matter for the intended usage in the scheduler, but I feel it's natural to return false for a empty callback. Let me update this.
https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc File base/callback_internal.cc (right): https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... base/callback_internal.cc:41: DCHECK(bind_state_); On 2016/09/08 03:55:10, tzik wrote: > On 2016/09/07 21:40:27, dcheng wrote: > > On 2016/09/07 15:53:53, alex clarke wrote: > > > Can we do this instead of the DCHECK? > > > > > > if (!bind_state_) > > > return false; > > > > If there's a null callback posted to the task queue, we'll explode anyway when > > we try to Run() it. So DCHECKing seems fine to me. > > Hmm, right, it doesn't matter for the intended usage in the scheduler, but I > feel it's natural to return false for a empty callback. Let me update this. What is the use case where we'd want to call this on an empty callback? I feel pretty strongly about keeping this a DCHECK: IsCancelled() simply doesn't have any meaning for an empty callback.
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...
https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc File base/callback_internal.cc (right): https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... base/callback_internal.cc:41: DCHECK(bind_state_); On 2016/09/08 04:01:33, dcheng wrote: > On 2016/09/08 03:55:10, tzik wrote: > > On 2016/09/07 21:40:27, dcheng wrote: > > > On 2016/09/07 15:53:53, alex clarke wrote: > > > > Can we do this instead of the DCHECK? > > > > > > > > if (!bind_state_) > > > > return false; > > > > > > If there's a null callback posted to the task queue, we'll explode anyway > when > > > we try to Run() it. So DCHECKing seems fine to me. > > > > Hmm, right, it doesn't matter for the intended usage in the scheduler, but I > > feel it's natural to return false for a empty callback. Let me update this. > > What is the use case where we'd want to call this on an empty callback? I feel > pretty strongly about keeping this a DCHECK: IsCancelled() simply doesn't have > any meaning for an empty callback. There will be no actual use case for it. I just think state query functions should be always valid. Anyway, I don't have strong opinion on this. And it's OK to me to revert this to DCHECK.
On 2016/09/08 05:21:46, tzik wrote: > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc > File base/callback_internal.cc (right): > > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... > base/callback_internal.cc:41: DCHECK(bind_state_); > On 2016/09/08 04:01:33, dcheng wrote: > > On 2016/09/08 03:55:10, tzik wrote: > > > On 2016/09/07 21:40:27, dcheng wrote: > > > > On 2016/09/07 15:53:53, alex clarke wrote: > > > > > Can we do this instead of the DCHECK? > > > > > > > > > > if (!bind_state_) > > > > > return false; > > > > > > > > If there's a null callback posted to the task queue, we'll explode anyway > > when > > > > we try to Run() it. So DCHECKing seems fine to me. > > > > > > Hmm, right, it doesn't matter for the intended usage in the scheduler, but > I > > > feel it's natural to return false for a empty callback. Let me update this. > > > > What is the use case where we'd want to call this on an empty callback? I feel > > pretty strongly about keeping this a DCHECK: IsCancelled() simply doesn't have > > any meaning for an empty callback. > > There will be no actual use case for it. I just think state query functions > should be always valid. > Anyway, I don't have strong opinion on this. And it's OK to me to revert this to > DCHECK. LGTM
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_...)
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...
On 2016/09/08 04:01:33, dcheng wrote: > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc > File base/callback_internal.cc (right): > > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... > base/callback_internal.cc:41: DCHECK(bind_state_); > On 2016/09/08 03:55:10, tzik wrote: > > On 2016/09/07 21:40:27, dcheng wrote: > > > On 2016/09/07 15:53:53, alex clarke wrote: > > > > Can we do this instead of the DCHECK? > > > > > > > > if (!bind_state_) > > > > return false; > > > > > > If there's a null callback posted to the task queue, we'll explode anyway > when > > > we try to Run() it. So DCHECKing seems fine to me. > > > > Hmm, right, it doesn't matter for the intended usage in the scheduler, but I > > feel it's natural to return false for a empty callback. Let me update this. > > What is the use case where we'd want to call this on an empty callback? I feel > pretty strongly about keeping this a DCHECK: IsCancelled() simply doesn't have > any meaning for an empty callback. If the DCHECK stays I'm going to have to change a lot unit tests in the blink scheduler which use tasks with empty closures.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/09/08 08:45:03, alex clarke wrote: > On 2016/09/08 04:01:33, dcheng wrote: > > > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.cc > > File base/callback_internal.cc (right): > > > > > https://codereview.chromium.org/2289703002/diff/60001/base/callback_internal.... > > base/callback_internal.cc:41: DCHECK(bind_state_); > > On 2016/09/08 03:55:10, tzik wrote: > > > On 2016/09/07 21:40:27, dcheng wrote: > > > > On 2016/09/07 15:53:53, alex clarke wrote: > > > > > Can we do this instead of the DCHECK? > > > > > > > > > > if (!bind_state_) > > > > > return false; > > > > > > > > If there's a null callback posted to the task queue, we'll explode anyway > > when > > > > we try to Run() it. So DCHECKing seems fine to me. > > > > > > Hmm, right, it doesn't matter for the intended usage in the scheduler, but > I > > > feel it's natural to return false for a empty callback. Let me update this. > > > > What is the use case where we'd want to call this on an empty callback? I feel > > pretty strongly about keeping this a DCHECK: IsCancelled() simply doesn't have > > any meaning for an empty callback. > > If the DCHECK stays I'm going to have to change a lot unit tests in the blink > scheduler which use tasks with empty closures. Actually never mind. I've just gone and fixed all the tests (in my follow on patch) that would break due to this.
The CQ bit was checked by tzik@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yutak@chromium.org, alexclarke@chromium.org Link to the patchset: https://codereview.chromium.org/2289703002/#ps140001 (title: "revert to PS5")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Add Callback::IsCancelled Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr invalidation. ========== to ========== Add Callback::IsCancelled Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr invalidation. ==========
Message was sent while issue was closed.
Committed patchset #8 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== Add Callback::IsCancelled Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr invalidation. ========== to ========== Add Callback::IsCancelled Callback::IsCancelled() checks if the Callback is cancelled by WeakPtr invalidation. Committed: https://crrev.com/59aa6bb1162b31d2af31c4a235c67826687b6b28 Cr-Commit-Position: refs/heads/master@{#417248} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/59aa6bb1162b31d2af31c4a235c67826687b6b28 Cr-Commit-Position: refs/heads/master@{#417248} |