diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 19:50:42 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 19:50:42 +0000 |
commit | 99050a88a4fe4f4acaa7b98e94cea7f0a84b4f18 (patch) | |
tree | b96fc0e8370fd4e49547b345f44cbd7c9413103f /chrome/browser/views/tab_contents | |
parent | c7594166521973b656f13d7c08b75db7b603246f (diff) | |
download | chromium_src-99050a88a4fe4f4acaa7b98e94cea7f0a84b4f18.zip chromium_src-99050a88a4fe4f4acaa7b98e94cea7f0a84b4f18.tar.gz chromium_src-99050a88a4fe4f4acaa7b98e94cea7f0a84b4f18.tar.bz2 |
Fix two crashers with TOOLKIT_VIEWS build:
- NativeViewHostGtk::RemovedFromWidget crashes due to WidgetGtk::window_contents_ being NULL... basically when RemovedFromWidget is called from the RootView's dtor, the window_contents_ and widget_ properties of the containing WidgetGtk are NULL. It seems acceptable to not clean up in this case.
- TabContentsViewGtk dtor needs to call CloseNow(). This is similar to ~TabContents() calling DestroyWindow on the view's HWND. Without this, the TabContentsViewGtk object was destroyed but the corresponding GtkWidget wasn't, and so subsequent signal handlers would crash.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/159130
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tab_contents')
-rw-r--r-- | chrome/browser/views/tab_contents/tab_contents_view_gtk.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc index 32fedaa..e2ad712 100644 --- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc @@ -96,6 +96,10 @@ TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents) } TabContentsViewGtk::~TabContentsViewGtk() { + // Just deleting the object doesn't destroy the GtkWidget. We need to do that + // manually, and synchronously, since subsequent signal handlers may expect + // to locate this object. + CloseNow(); } void TabContentsViewGtk::CreateView() { |