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

Unified Diff: chrome/browser/ui/gtk/tab_contents_container_gtk.cc

Issue 9109028: GTK: Another GTK deprecation patch. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove chromeos file Created 8 years, 12 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/ui/gtk/rounded_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tab_contents_container_gtk.cc
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
index 48e45a947656605852976a6f25319d0070474349..16aad3a0eae44532d254f9963f8819964c8ea853 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
@@ -165,8 +165,9 @@ void TabContentsContainerGtk::DetachTab(TabContentsWrapper* tab) {
// It is possible to detach an unrealized, unparented TabContents if you
// slow things down enough in valgrind. Might happen in the real world, too.
- if (widget && widget->parent) {
- DCHECK_EQ(widget->parent, expanded_);
+ GtkWidget* parent = gtk_widget_get_parent(widget);
Evan Martin 2012/01/05 22:50:37 Do we need to null-check widget first here? We do
Elliot Glaysher 2012/01/05 23:19:49 Good catch
+ if (widget && parent) {
+ DCHECK_EQ(parent, expanded_);
gtk_container_remove(GTK_CONTAINER(expanded_), widget);
}
}
« no previous file with comments | « chrome/browser/ui/gtk/rounded_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698