summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 17:56:16 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 17:56:16 +0000
commit01ba6d347ce84345b729131f27e48a1732aac83c (patch)
treeca6518ef0d3f9503431e04ea783ffa7095568ca5 /chrome/browser/views
parentcd4a83858ee51f7c8a0f9afb0f378b5bbd4e5098 (diff)
downloadchromium_src-01ba6d347ce84345b729131f27e48a1732aac83c.zip
chromium_src-01ba6d347ce84345b729131f27e48a1732aac83c.tar.gz
chromium_src-01ba6d347ce84345b729131f27e48a1732aac83c.tar.bz2
When a GtkWidget was destroyed the NVH would not be detached.
There was a hack in location_bar_view to prevent an assert, but it would cause an other assert. Also fixed a double delete with the find_bar_host. BUG=None TEST=Start Chrome Linux toolkit view. Close it. It should not assert. Review URL: http://codereview.chromium.org/266034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rwxr-xr-xchrome/browser/views/find_bar_host_gtk.cc5
-rw-r--r--chrome/browser/views/location_bar_view.cc6
2 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/views/find_bar_host_gtk.cc b/chrome/browser/views/find_bar_host_gtk.cc
index 6b05f92..e517407 100755
--- a/chrome/browser/views/find_bar_host_gtk.cc
+++ b/chrome/browser/views/find_bar_host_gtk.cc
@@ -24,7 +24,10 @@ void FindBarHost::AudibleAlert() {
}
views::Widget* FindBarHost::CreateHost() {
- return new views::WidgetGtk(views::WidgetGtk::TYPE_CHILD);
+ views::WidgetGtk* host = new views::WidgetGtk(views::WidgetGtk::TYPE_CHILD);
+ // We own the host.
+ host->set_delete_on_destroy(false);
+ return host;
}
void FindBarHost::SetDialogPositionNative(const gfx::Rect& new_pos,
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index b7a97a7..ea6b526 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -114,12 +114,6 @@ 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();
}