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

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2345373002: arc: Fix UpdatePinnedState crash (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_view.cc
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
index f0ba730697cd75b070bb17a7d42038359d2cd267..b38cd323645366fcd115931010cfa5a325e517d9 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -230,7 +230,8 @@ void ArcCustomNotificationView::SetSurface(exo::NotificationSurface* surface) {
if (GetWidget())
AttachSurface();
- UpdatePinnedState();
+ if (item_)
yoshiki 2016/09/20 03:43:06 The patch itself lgtm, but why item is null here?
xiyuan 2016/09/20 15:58:16 There is a racing between ArcNotificationService a
+ UpdatePinnedState();
}
}
@@ -268,6 +269,8 @@ void ArcCustomNotificationView::UpdateCloseButtonVisiblity() {
}
void ArcCustomNotificationView::UpdatePinnedState() {
+ DCHECK(item_);
+
if (item_->pinned() && floating_close_button_widget_) {
floating_close_button_widget_.reset();
} else if (!item_->pinned() && !floating_close_button_widget_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698