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

Unified Diff: chrome/browser/gtk/tabs/tab_strip_gtk.cc

Issue 159166: gtk: Two fixes for the tab leak:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/tab_strip_gtk.cc
===================================================================
--- chrome/browser/gtk/tabs/tab_strip_gtk.cc (revision 21211)
+++ chrome/browser/gtk/tabs/tab_strip_gtk.cc (working copy)
@@ -829,7 +829,10 @@
}
gtk_container_remove(GTK_CONTAINER(tabstrip_.get()), tab->widget());
- delete tab;
+ // If we delete the dragged source tab here, the gtk drag-n-drop API won't
+ // get a change to clean up and remove any references it's added to the tab
+ // widget, so we'll leak the widget.
+ MessageLoop::current()->DeleteSoon(FROM_HERE, tab);
tony 2009/07/21 22:55:44 You're sure that the gtk d&d api will get to run b
// Force a layout here, because if we've just quickly drag detached a Tab,
// the stopping of the active animation above may have left the TabStrip in a
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698