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

Side by Side Diff: ui/base/gtk/owned_widget_gtk.cc

Issue 21123007: Reenable BrowserTest.WindowOpenClose (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/gtk/owned_widget_gtk.h" 5 #include "ui/base/gtk/owned_widget_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 19 matching lines...) Expand all
30 30
31 void OwnedWidgetGtk::Destroy() { 31 void OwnedWidgetGtk::Destroy() {
32 if (!widget_) 32 if (!widget_)
33 return; 33 return;
34 34
35 GtkWidget* widget = widget_; 35 GtkWidget* widget = widget_;
36 widget_ = NULL; 36 widget_ = NULL;
37 gtk_widget_destroy(widget); 37 gtk_widget_destroy(widget);
38 38
39 DCHECK(!g_object_is_floating(widget)); 39 DCHECK(!g_object_is_floating(widget));
40 // NOTE: Assumes some implementation details about glib internals.
41 DCHECK_EQ(G_OBJECT(widget)->ref_count, 1U);
Elliot Glaysher 2013/07/30 18:13:49 While I really really want this line gone (and is
Evan Stade 2013/07/30 22:08:50 This DCHECK is not spurious. It was intentionally
42 g_object_unref(widget); 40 g_object_unref(widget);
43 } 41 }
44 42
45 } // namespace ui 43 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698