From acb7d597819483d8db4b28fdf42b3e9d07182b5b Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Wed, 15 Jul 2009 00:37:06 +0000 Subject: 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 --- views/controls/menu/menu_2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'views') 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 wrapper_; DISALLOW_COPY_AND_ASSIGN(Menu2); }; -- cgit v1.1