diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 21:48:08 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 21:48:08 +0000 |
commit | 6d2adbe35ab026b770c3de40cd648424f6aaadab (patch) | |
tree | f4e485571c831f0731b31ee304aa94a774840f59 /views/window | |
parent | b1c7cc42d026a073d1db2e7fa293be525e936738 (diff) | |
download | chromium_src-6d2adbe35ab026b770c3de40cd648424f6aaadab.zip chromium_src-6d2adbe35ab026b770c3de40cd648424f6aaadab.tar.gz chromium_src-6d2adbe35ab026b770c3de40cd648424f6aaadab.tar.bz2 |
Implement BrowserList::AllBrowsersClosed for Linux.
This fixes leaks caused by not calling gtk_widget_destroy on
dialog windows when we exit.
While I'm here, fix a GList leak on Linux toolkit views.
Review URL: http://codereview.chromium.org/223015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/window_gtk.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 8550fe7..7e833cb 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -90,11 +90,13 @@ Window* Window::CreateChromeWindow(gfx::NativeWindow parent, // static void Window::CloseAllSecondaryWindows() { - for (GList* window = gtk_window_list_toplevels(); window; + GList* windows = gtk_window_list_toplevels(); + for (GList* window = windows; window; window = g_list_next(window)) { Window::CloseSecondaryWidget( WidgetGtk::GetViewForNative(GTK_WIDGET(window->data))); } + g_list_free(windows); } gfx::Rect WindowGtk::GetBounds() const { |