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

Unified Diff: chrome/browser/gtk/download_item_gtk.cc

Issue 124001: Linux: fix icon theme double free on shutdown.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/download_item_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/download_item_gtk.cc
===================================================================
--- chrome/browser/gtk/download_item_gtk.cc (revision 18182)
+++ chrome/browser/gtk/download_item_gtk.cc (working copy)
@@ -250,10 +250,9 @@
gtk_box_pack_start(GTK_BOX(shelf_hbox), hbox_.get(), FALSE, FALSE, 0);
// Insert as the leftmost item.
gtk_box_reorder_child(GTK_BOX(shelf_hbox), hbox_.get(), 1);
+ g_signal_connect(G_OBJECT(shelf_hbox), "size-allocate",
+ G_CALLBACK(OnShelfResized), this);
- resize_handler_id_ = g_signal_connect(G_OBJECT(shelf_hbox), "size-allocate",
- G_CALLBACK(OnShelfResized), this);
-
get_download()->AddObserver(this);
new_item_animation_.reset(new SlideAnimation(this));
@@ -346,6 +345,8 @@
DownloadItemGtk::~DownloadItemGtk() {
StopDownloadProgress();
get_download()->RemoveObserver(this);
+ g_signal_handlers_disconnect_by_func(parent_shelf_->GetHBox(),
+ reinterpret_cast<gpointer>(OnShelfResized), this);
hbox_.Destroy();
progress_area_.Destroy();
@@ -365,9 +366,6 @@
switch (download->state()) {
case DownloadItem::REMOVING:
- // We disconnect here rather than the d'tor because we don't want to
- // explicitly disconnect if |parent_shelf_| has been destroyed.
- g_signal_handler_disconnect(parent_shelf_->GetHBox(), resize_handler_id_);
parent_shelf_->RemoveDownloadItem(this); // This will delete us!
return;
case DownloadItem::CANCELLED:
« no previous file with comments | « chrome/browser/gtk/download_item_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698