|
|
Created:
3 years, 8 months ago by Eliot Courtney Modified:
3 years, 7 months ago CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, yusukes+watch_chromium.org, victorhsieh+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[Notifications] Fix crashes.
Destructing floating_control_button_widget_ eventually calls
UpdateControlButtonsVisibility so only create it there if |item_| is
non-null.
Add additional null checks to ShouldUpdateControlButtonsColor.
BUG=712773
BUG=714032
Review-Url: https://codereview.chromium.org/2834763003
Cr-Commit-Position: refs/heads/master@{#466921}
Committed: https://chromium.googlesource.com/chromium/src/+/393c304c284a4f1e79c55e1547d4399a63eb2ff9
Patch Set 1 #
Total comments: 6
Patch Set 2 : Address comments. #
Messages
Total messages: 20 (11 generated)
yhanada@google.com changed reviewers: + yhanada@google.com
https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:363: // OnItemDestroying event. That is, calling this method may indirectly cause method?
edcourtney@chromium.org changed reviewers: + xiyuan@chromium.org, yhanada@chromium.org, yoshiki@chromium.org - yhanada@google.com
lgtm Nice.
lgtm with nits https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:388: if (!floating_control_buttons_widget_) I think the following structure is better for readability. if (!floating_control_buttons_widget_) { MaybeCreateFloatingControlButtons(); if (!floating_control_buttons_widget_) return; } Please mention that floating_control_buttons_widget_ may be updated in MaybeCreateFloatingControlButtons(). https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:461: return false; I think it's better to check item_ in the caller instead of here for consistency. But it's up to you.
The CQ bit was checked by edcourtney@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...
Thanks for the reviews~! https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:363: // OnItemDestroying event. That is, calling this method may indirectly cause On 2017/04/21 08:06:49, yhanada1 wrote: > method? With crrev.com/2833403002 this comment is no longer accurate, so I removed it. https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:388: if (!floating_control_buttons_widget_) On 2017/04/21 15:21:38, yoshiki wrote: > I think the following structure is better for readability. > if (!floating_control_buttons_widget_) { > MaybeCreateFloatingControlButtons(); > if (!floating_control_buttons_widget_) > return; > } > > Please mention that floating_control_buttons_widget_ may be updated in > MaybeCreateFloatingControlButtons(). Done. https://codereview.chromium.org/2834763003/diff/1/ui/arc/notification/arc_cus... ui/arc/notification/arc_custom_notification_view.cc:461: return false; On 2017/04/21 15:21:38, yoshiki wrote: > I think it's better to check item_ in the caller instead of here for > consistency. But it's up to you. I thought it would be good to create preconditions at the top of every function. This function accesses item_ so I figured it'd be better to check it close to the access.
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
Description was changed from ========== [Notifications] Fix crashes. Destructing floating_control_button_widget_ eventually calls UpdateControlButtonsVisibility so only create it there if |item_| is non-null, fixing a crash on clearing all notifications. The SetPreferredSize call in UpdatePinnedState can result in |item_| being set to null, and OnItemDestroying being called. Check for |item_| being not null in ShouldUpdateControlButtonsColor to handle this case. BUG=712773 BUG=714032 ========== to ========== [Notifications] Fix crashes. Destructing floating_control_button_widget_ eventually calls UpdateControlButtonsVisibility so only create it there if |item_| is non-null. Add additional null checks to ShouldUpdateControlButtonsColor. BUG=712773 BUG=714032 ==========
The CQ bit was checked by edcourtney@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from xiyuan@chromium.org Link to the patchset: https://codereview.chromium.org/2834763003/#ps20001 (title: "Address comments.")
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": 20001, "attempt_start_ts": 1493107384253460, "parent_rev": "c200756ff65784f2151383ea803d177d6a9767a6", "commit_rev": "393c304c284a4f1e79c55e1547d4399a63eb2ff9"}
Message was sent while issue was closed.
Description was changed from ========== [Notifications] Fix crashes. Destructing floating_control_button_widget_ eventually calls UpdateControlButtonsVisibility so only create it there if |item_| is non-null. Add additional null checks to ShouldUpdateControlButtonsColor. BUG=712773 BUG=714032 ========== to ========== [Notifications] Fix crashes. Destructing floating_control_button_widget_ eventually calls UpdateControlButtonsVisibility so only create it there if |item_| is non-null. Add additional null checks to ShouldUpdateControlButtonsColor. BUG=712773 BUG=714032 Review-Url: https://codereview.chromium.org/2834763003 Cr-Commit-Position: refs/heads/master@{#466921} Committed: https://chromium.googlesource.com/chromium/src/+/393c304c284a4f1e79c55e1547d4... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/393c304c284a4f1e79c55e1547d4... |