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

Unified Diff: chrome/browser/ui/views/toolbar/browser_action_view.h

Issue 615543006: Fix use-after-free in BrowserActionView::~BrowserActionView() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/toolbar/browser_action_view.h
diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.h b/chrome/browser/ui/views/toolbar/browser_action_view.h
index 389e9f92355e24f6d4da04cba04016ad196cec7e..809f9dafd18a82fbed1c68eec0ea2d00e8aeedf6 100644
--- a/chrome/browser/ui/views/toolbar/browser_action_view.h
+++ b/chrome/browser/ui/views/toolbar/browser_action_view.h
@@ -169,6 +169,12 @@ class BrowserActionView : public views::MenuButton,
virtual void OnPopupShown(bool grant_tab_permissions) OVERRIDE;
virtual void CleanupPopup() OVERRIDE;
+ // A lock to keep the MenuButton pressed when a menu or popup is visible.
+ // This needs to be destroyed after |view_controller_|, because
+ // |view_controller_|'s destructor can call CleanupPopup(), which uses this
+ // object.
+ scoped_ptr<views::MenuButton::PressedLock> pressed_lock_;
+
// The controller for this ExtensionAction view.
scoped_ptr<ExtensionActionViewController> view_controller_;
@@ -184,9 +190,6 @@ class BrowserActionView : public views::MenuButton,
// updated.
IconObserver* icon_observer_;
- // A lock to keep the MenuButton pressed when a menu or popup is visible.
- scoped_ptr<views::MenuButton::PressedLock> pressed_lock_;
-
DISALLOW_COPY_AND_ASSIGN(BrowserActionView);
};
« 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