Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: chrome/browser/ui/views/extensions/extension_popup.cc

Issue 275783002: Fix an ExtensionPopup crash on browser window close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/extensions/extension_popup.cc
diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
index 566858620dd3e837200f8332096742344a5f33f2..838e2689d359853649a983819f45a3911b176ab0 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.cc
+++ b/chrome/browser/ui/views/extensions/extension_popup.cc
@@ -158,7 +158,10 @@ void ExtensionPopup::OnWidgetDestroying(views::Widget* widget) {
aura::Window* bubble_window = GetWidget()->GetNativeWindow();
aura::client::ActivationClient* activation_client =
aura::client::GetActivationClient(bubble_window->GetRootWindow());
- activation_client->RemoveObserver(this);
+ // If the popup was being inspected with devtools and the browser window was
+ // closed, then the root window and activation client are already destroyed.
+ if (activation_client)
+ activation_client->RemoveObserver(this);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698