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

Unified Diff: chrome/browser/ui/views/browser_actions_container.cc

Issue 9535020: Fix DCHECK in BrowserActionsContainer::OnWidgetClosing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/browser_actions_container.cc
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 8a9f50ac5061978867d12171cd1f1688e260bc44..9d650964690dd005d92efe6bd013e63e8463f3ec 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -834,9 +834,15 @@ void BrowserActionsContainer::MoveBrowserAction(const std::string& extension_id,
}
void BrowserActionsContainer::HidePopup() {
+ // Remove this as an observer and clear |popup_| and |popup_button_| here,
+ // since we might change them before OnWidgetClosing() gets called.
if (popup_) {
+ popup_->GetWidget()->RemoveObserver(this);
popup_->GetWidget()->Close();
- // NULL out popup_button_ in case it's being deleted.
+ popup_ = NULL;
+ }
+ if (popup_button_) {
+ popup_button_->SetButtonNotPushed();
popup_button_ = NULL;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698