Commit d29e2a80 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Fix crash after pressing ESC with message center focused.

This regression was caused by refactoring the delegate in
https://chromium-review.googlesource.com/c/chromium/src/+/1938253

Change-Id: I2fe052bbe240b9fb19ef0c6c5bd633f8d67f2336
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940870Reviewed-by: default avatarAhmed Mehfooz <amehfooz@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721704}
parent c133a234
......@@ -115,6 +115,7 @@ UnifiedMessageCenterBubble::~UnifiedMessageCenterBubble() {
CHECK(message_center_view_);
message_center_view_->RemoveObserver(this);
bubble_view_->ResetDelegate();
bubble_widget_->RemoveObserver(this);
bubble_widget_->CloseNow();
}
......@@ -208,6 +209,7 @@ void UnifiedMessageCenterBubble::OnWidgetDestroying(views::Widget* widget) {
message_center_view_->RemoveObserver(this);
bubble_widget_->RemoveObserver(this);
bubble_widget_ = nullptr;
bubble_view_->ResetDelegate();
// Close the quick settings bubble as well, which may not automatically happen
// when dismissing the message center bubble by pressing ESC.
......
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