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

Issue 48065: Ensure that MenuGtks are destroyed before their accelerator group. (Closed)

Created:
11 years, 9 months ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Ensure that MenuGtks are destroyed before their accelerator group. When a MenuGtk is created, it is passed a GtkAccelGroup. Previously the GtkMenu widgets were destroyed after the browser window, which was the owner of the GtkAccelGroup. Make the toolbar own a reference to the GtkAccelGroup, and teardown all GtkMenus that reference it beforehand. Some MenuGtk cleanup while debugging the problem. BUG=8866

Patch Set 1 #

Patch Set 2 : Merge to trunk. #

Total comments: 2

Patch Set 3 : reinterpretcast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -30 lines) Patch
M chrome/browser/gtk/browser_toolbar_gtk.cc View 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/gtk/menu_gtk.h View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/gtk/menu_gtk.cc View 1 2 8 chunks +12 lines, -23 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Dean McNamee
I am not actually 100% sure of this fix, I didn't write the code, and ...
11 years, 9 months ago (2009-03-17 13:56:17 UTC) #1
tony
Adding Elliot as a reviewer since I think he wrote the accelerator code. http://codereview.chromium.org/48065/diff/1004/1006 File ...
11 years, 9 months ago (2009-03-17 17:02:49 UTC) #2
Elliot Glaysher
LGTM.
11 years, 9 months ago (2009-03-17 17:08:40 UTC) #3
Dean McNamee
http://codereview.chromium.org/48065/diff/1004/1006 File chrome/browser/gtk/menu_gtk.cc (right): http://codereview.chromium.org/48065/diff/1004/1006#newcode238 Line 238: void MenuGtk::SetMenuItemInfo(GtkWidget* widget, gpointer userdata) { I prefer ...
11 years, 9 months ago (2009-03-17 17:12:44 UTC) #4
Evan Stade
11 years, 9 months ago (2009-03-17 17:33:02 UTC) #5
ah! this is all because MenuGtk owns the gtk menu widgets, so they don't get
destroyed when the top level window gets destroyed. Good find. Too bad our
ownership model sacrifices GTK's (well tested) destruction order.

lgtm

As for G_CALLBACK prototypes, we've commonly had the signatures do the casting.
For the sake of consistency, can we pick one and stick to it? I think it's
cleaner not to have to cast.

Powered by Google App Engine
This is Rietveld 408576698