From 72baf67602ab1dbf95c34a5d8301e0ac5f8b8b41 Mon Sep 17 00:00:00 2001 From: "stoyan@chromium.org" Date: Wed, 6 May 2009 18:45:33 +0000 Subject: Destroy browser/content related C++ object on WM_DESTROY message, rather than OnFinalMessage Review URL: http://codereview.chromium.org/115034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15434 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/external_tab_container.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chrome/browser/external_tab_container.cc') diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index 9fd060e..bf6dfd8 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -130,7 +130,6 @@ bool ExternalTabContainer::Uninitialize(HWND window) { } void ExternalTabContainer::OnFinalMessage(HWND window) { - Uninitialize(window); delete this; } @@ -145,6 +144,11 @@ LRESULT ExternalTabContainer::OnSize(UINT, WPARAM, LPARAM, BOOL& handled) { return 0; } +LRESULT ExternalTabContainer::OnDestroy(UINT, WPARAM, LPARAM, BOOL& handled) { + Uninitialize(m_hWnd); + return 0; +} + void ExternalTabContainer::OpenURLFromTab(TabContents* source, const GURL& url, const GURL& referrer, -- cgit v1.1