Commit 28a9722f authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Fix crash in ImmersiveFocusWatcherMus during shutdown.

Test: browser_tests
Bug: none
Change-Id: I2f4841af05d1ca2b0ea3ad686e8e1b322549b3d2
Reviewed-on: https://chromium-review.googlesource.com/1197903Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587844}
parent 6a49603a
...@@ -172,7 +172,9 @@ ImmersiveFocusWatcherMus::ImmersiveFocusWatcherMus( ...@@ -172,7 +172,9 @@ ImmersiveFocusWatcherMus::ImmersiveFocusWatcherMus(
ImmersiveFocusWatcherMus::~ImmersiveFocusWatcherMus() { ImmersiveFocusWatcherMus::~ImmersiveFocusWatcherMus() {
aura::client::GetTransientWindowClient()->RemoveObserver(this); aura::client::GetTransientWindowClient()->RemoveObserver(this);
GetWidget()->GetFocusManager()->RemoveFocusChangeListener(this); GetWidget()->GetFocusManager()->RemoveFocusChangeListener(this);
::wm::GetActivationClient(GetWidgetWindow())->RemoveObserver(this); auto* activation_client = ::wm::GetActivationClient(GetWidgetWindow());
if (activation_client)
activation_client->RemoveObserver(this);
} }
void ImmersiveFocusWatcherMus::UpdateFocusRevealedLock() { void ImmersiveFocusWatcherMus::UpdateFocusRevealedLock() {
......
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