Commit 6232937b authored by xiyuan's avatar xiyuan Committed by Commit bot

arc: Fix crash on close a notification

Speculative fix of the notification close crash that the underlying
notification surface is changed after the floating close button
is created.

BUG=646634

Review-Url: https://codereview.chromium.org/2338423002
Cr-Commit-Position: refs/heads/master@{#418881}
parent 40aece67
......@@ -213,6 +213,9 @@ void ArcCustomNotificationView::SetSurface(exo::NotificationSurface* surface) {
if (surface_ == surface)
return;
// Reset |floating_close_button_widget_| when |surface_| is changed.
floating_close_button_widget_.reset();
if (surface_ && surface_->window()) {
surface_->window()->RemoveObserver(this);
surface_->window()->RemovePreTargetHandler(event_forwarder_.get());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment