summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/tabs/tab_gtk.cc3
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc5
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/gtk/tabs/tab_gtk.cc b/chrome/browser/gtk/tabs/tab_gtk.cc
index 096f0fe..8394bc4 100644
--- a/chrome/browser/gtk/tabs/tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_gtk.cc
@@ -113,7 +113,6 @@ TabGtk::TabGtk(TabDelegate* delegate)
closing_(false),
dragging_(false) {
event_box_ = gtk_event_box_new();
- g_object_ref(event_box_);
gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_), FALSE);
gtk_drag_source_set(event_box_, GDK_BUTTON1_MASK,
NULL, 0, GDK_ACTION_MOVE);
@@ -150,8 +149,6 @@ TabGtk::~TabGtk() {
// Invoke this so that we hide the highlight.
ContextMenuClosed();
}
-
- gtk_widget_destroy(event_box_);
}
// static
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 191d027..2a884fc 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -829,7 +829,10 @@ void TabStripGtk::DestroyDraggedSourceTab(TabGtk* tab) {
}
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);
// 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