diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 19:45:17 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 19:45:17 +0000 |
commit | 312114c96295fc23fd28981a0e5baa7f71a9ff9f (patch) | |
tree | 43359fcdfb2b203df68741d49eb245d3a52a2c90 /chrome | |
parent | 94fdd85d840fa2d3a8ba4f46241cc53f0b1c05d8 (diff) | |
download | chromium_src-312114c96295fc23fd28981a0e5baa7f71a9ff9f.zip chromium_src-312114c96295fc23fd28981a0e5baa7f71a9ff9f.tar.gz chromium_src-312114c96295fc23fd28981a0e5baa7f71a9ff9f.tar.bz2 |
[gtk] Fix a widget leak.
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/4835002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/bookmark_menu_controller_gtk.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/gtk/bookmark_menu_controller_gtk.cc b/chrome/browser/gtk/bookmark_menu_controller_gtk.cc index 8924cfb..5930fb1 100644 --- a/chrome/browser/gtk/bookmark_menu_controller_gtk.cc +++ b/chrome/browser/gtk/bookmark_menu_controller_gtk.cc @@ -80,6 +80,7 @@ BookmarkMenuController::BookmarkMenuController(Browser* browser, ignore_button_release_(false), triggering_widget_(NULL) { menu_ = gtk_menu_new(); + g_object_ref_sink(menu_); BuildMenu(node, start_child_index, menu_); signals_.Connect(menu_, "hide", G_CALLBACK(OnMenuHiddenThunk), this); @@ -88,7 +89,8 @@ BookmarkMenuController::BookmarkMenuController(Browser* browser, BookmarkMenuController::~BookmarkMenuController() { profile_->GetBookmarkModel()->RemoveObserver(this); - gtk_menu_popdown(GTK_MENU(menu_)); + gtk_widget_destroy(menu_); + g_object_unref(menu_); } void BookmarkMenuController::Popup(GtkWidget* widget, gint button_type, |