diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 17:51:29 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 17:51:29 +0000 |
commit | 9b3f7e24be4d7417ddb409470818cbfebc722a40 (patch) | |
tree | a3448bde52a294ed9756d9acffacae933ba2dde9 /ui | |
parent | eaf5178e6992dfa0791eed5e34cb5f66551461a2 (diff) | |
download | chromium_src-9b3f7e24be4d7417ddb409470818cbfebc722a40.zip chromium_src-9b3f7e24be4d7417ddb409470818cbfebc722a40.tar.gz chromium_src-9b3f7e24be4d7417ddb409470818cbfebc722a40.tar.bz2 |
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
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 57692fa..5f9d906 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -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()); } } |