Commit 20098535 authored by stevenjb@chromium.org's avatar stevenjb@chromium.org

Fix DCHECK in BrowserActionsContainer::OnWidgetClosing

BUG=116270
TEST=See issue


Review URL: http://codereview.chromium.org/9535020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125006 0039d316-1c4b-4281-b951-d872f2087c98
parent b2d9fa1d
......@@ -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;
}
}
......
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