diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 00:37:06 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 00:37:06 +0000 |
commit | acb7d597819483d8db4b28fdf42b3e9d07182b5b (patch) | |
tree | f137b85d19ce453a3089e374c98d07c0a6dca0ae /views | |
parent | faf1a4aab0faaa80cb1687e5535faef8455879ad (diff) | |
download | chromium_src-acb7d597819483d8db4b28fdf42b3e9d07182b5b.zip chromium_src-acb7d597819483d8db4b28fdf42b3e9d07182b5b.tar.gz chromium_src-acb7d597819483d8db4b28fdf42b3e9d07182b5b.tar.bz2 |
Attempt fixing a crash. Looks like NativeMenuWin was getting leaked by Menu2... meaning a NativeMenuWin could outlive its model potentially!
http://crbug.com/14594
TEST=none
Review URL: http://codereview.chromium.org/149635
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/menu_2.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/views/controls/menu/menu_2.h b/views/controls/menu/menu_2.h index 045309e..c0e2c27 100644 --- a/views/controls/menu/menu_2.h +++ b/views/controls/menu/menu_2.h @@ -6,7 +6,9 @@ #define CONTROLS_MENU_VIEWS_MENU_2_H_ #include "base/gfx/native_widget_types.h" +#include "base/scoped_ptr.h" #include "base/string16.h" +#include "views/controls/menu/menu_wrapper.h" namespace gfx { class Point; @@ -17,7 +19,6 @@ namespace views { class Accelerator; class Menu2; -class MenuWrapper; // The Menu2Model is an interface implemented by an object that provides the // content of a menu. @@ -142,7 +143,7 @@ class Menu2 { Menu2Model* model_; // The object that actually implements the menu. - MenuWrapper* wrapper_; + scoped_ptr<MenuWrapper> wrapper_; DISALLOW_COPY_AND_ASSIGN(Menu2); }; |