Commit 987d8bc9 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Fix MessageListView crash on update during close.

MessageListView crashes when a notification is updated during the
UnifiedSystemTray is closing. Like other views::Widget methods,
SynthesizeMouseMoveEvent() should not be called during the widget is
closing.

See the bug for the asan trace.

TEST=manual
BUG=894070

Change-Id: I9ffba0f73260542ebf21b2aef572af1f68e5c40b
Reviewed-on: https://chromium-review.googlesource.com/c/1276225
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598768}
parent fe7f3820
...@@ -433,7 +433,7 @@ void MessageListView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { ...@@ -433,7 +433,7 @@ void MessageListView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
if (need_update) if (need_update)
DoUpdateIfPossible(); DoUpdateIfPossible();
if (GetWidget()) if (GetWidget() && !GetWidget()->IsClosed())
GetWidget()->SynthesizeMouseMoveEvent(); GetWidget()->SynthesizeMouseMoveEvent();
} }
......
...@@ -96,7 +96,7 @@ void NewUnifiedMessageCenterView::ListPreferredSizeChanged() { ...@@ -96,7 +96,7 @@ void NewUnifiedMessageCenterView::ListPreferredSizeChanged() {
PreferredSizeChanged(); PreferredSizeChanged();
ScrollToPositionFromBottom(); ScrollToPositionFromBottom();
if (GetWidget()) if (GetWidget() && !GetWidget()->IsClosed())
GetWidget()->SynthesizeMouseMoveEvent(); GetWidget()->SynthesizeMouseMoveEvent();
} }
......
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