Commit 9b3f7e24 authored by jam@chromium.org's avatar jam@chromium.org

Fix crash when closing a constrained window in win aura. The crash happens...

Fix crash when closing a constrained window in win aura. The crash happens because the aura::Window for the constrained window is removing itself from its parent window, and its parent_ pointer is already NULL'd before the focus manager is retrieved which fails because aura::client::GetFocusClient can't get to a root window. See the bug for the callstack.

BUG=174727
Review URL: https://codereview.chromium.org/12226102

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181947 0039d316-1c4b-4281-b951-d872f2087c98
parent eaf5178e
......@@ -859,8 +859,9 @@ void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
DCHECK_EQ(ownership_, Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET);
}
delegate_->OnNativeBlur(
aura::client::GetFocusClient(window_)->GetFocusedWindow());
aura::client::FocusClient* client = aura::client::GetFocusClient(window_);
if (client) // NULL during destruction of aura::Window.
delegate_->OnNativeBlur(client->GetFocusedWindow());
}
}
......
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