From 91d8fbccdf96919f4a621a2920391b1376f0dd3c Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Thu, 5 Mar 2009 02:09:41 +0000 Subject: Fix a crash in chrome.exe caused by the external tab container instance getting destroyed without going through the proper window shutdown sequence when the external host crashes. The fix is to ensure that we clean up correctly when the external tab instance goes away. Will add a unit test in a subsequent CB. Bug=1688967 Review URL: http://codereview.chromium.org/39086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10962 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/external_tab_container.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chrome/browser/external_tab_container.h') diff --git a/chrome/browser/external_tab_container.h b/chrome/browser/external_tab_container.h index f786606..1bde9f9 100644 --- a/chrome/browser/external_tab_container.h +++ b/chrome/browser/external_tab_container.h @@ -41,7 +41,6 @@ class ExternalTabContainer : public TabContentsDelegate, BEGIN_MSG_MAP(ExternalTabContainer) MESSAGE_HANDLER(WM_SIZE, OnSize) MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) - MSG_WM_DESTROY(OnDestroy) END_MSG_MAP() DECLARE_WND_CLASS(chrome::kExternalTabWindowClass) @@ -56,6 +55,11 @@ class ExternalTabContainer : public TabContentsDelegate, bool Init(Profile* profile, HWND parent, const gfx::Rect& dimensions, unsigned int style); + // This function gets called from two places, which is fine. + // 1. OnFinalMessage + // 2. In the destructor. + bool Uninitialize(HWND window); + // Overridden from TabContentsDelegate: virtual void OpenURLFromTab(TabContents* source, const GURL& url, -- cgit v1.1