summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-01 00:07:13 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-01 00:07:13 +0000
commit6fd3e87645a59cbc5d28b2173ead9004ce22559e (patch)
treee9bbee136dc668252c7a6310cf07e03a2fa6b482 /chrome/browser
parenta2920638f52df5d5e0e3ea86c1802d4a7416abe5 (diff)
downloadchromium_src-6fd3e87645a59cbc5d28b2173ead9004ce22559e.zip
chromium_src-6fd3e87645a59cbc5d28b2173ead9004ce22559e.tar.gz
chromium_src-6fd3e87645a59cbc5d28b2173ead9004ce22559e.tar.bz2
Fix leak of GtkWidgets in NativeViewHost, and in doing so fix a crash on shutdown due to a check in OwnedWidgetGtk for unbalanced refcnt.
The NativeViewHostGtk now owns the GtkWidget attached to it for the lifetime of its attachment. This removes my crazy ownership games from before and makes it a lot simpler. BUG=none TEST=none Review URL: http://codereview.chromium.org/159751 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/views/location_bar_view.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index be756fc..8f9d813 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -130,6 +130,12 @@ LocationBarView::LocationBarView(Profile* profile,
}
LocationBarView::~LocationBarView() {
+#if defined(OS_LINUX)
+ // We must release the ref that the NativeViewHost has on the
+ // AutocompleteEditViewGtk, otherwise its internal OwnedWidgetGtk will
+ // complain about its refcount not being 1 as it is destroyed.
+ location_entry_view_->Detach();
+#endif
DeletePageActionViews();
}