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

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

Issue 1075014: Linux: Fix some GdkPixbuf leaks. (Closed)
Patch Set: move BrowserThemeProvider comment to the public functions Created 10 years, 9 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/extension_installed_bubble_gtk.cc ('k') | chrome/browser/gtk/keyword_editor_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/hung_renderer_dialog_gtk.cc
diff --git a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
index ded88d6ce397add84998b1da7246697735fd3b94..4012b99de0bc63e3c21c6deffe4c4d876c5075a4 100644
--- a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
@@ -157,12 +157,15 @@ void HungRendererDialogGtk::ShowForTabContents(TabContents* hung_contents) {
title = UTF16ToUTF8(TabContents::GetDefaultTitle());
SkBitmap favicon = it->GetFavIcon();
+ GdkPixbuf* pixbuf = NULL;
+ if (favicon.width() > 0)
+ pixbuf = gfx::GdkPixbufFromSkBitmap(&favicon);
gtk_list_store_set(model_, &tree_iter,
- COL_FAVICON, favicon.width() > 0
- ? gfx::GdkPixbufFromSkBitmap(&favicon)
- : NULL,
+ COL_FAVICON, pixbuf,
COL_TITLE, title.c_str(),
-1);
+ if (pixbuf)
+ g_object_unref(pixbuf);
}
}
gtk_widget_show_all(GTK_WIDGET(dialog_));
@@ -223,4 +226,3 @@ void HideForTabContents(TabContents* contents) {
}
} // namespace hung_renderer_dialog
-
« no previous file with comments | « chrome/browser/gtk/extension_installed_bubble_gtk.cc ('k') | chrome/browser/gtk/keyword_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698