| 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;
|
| }
|
| }
|
|
|