summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 18:29:01 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 18:29:01 +0000
commit394337cffb08b083513f3f93c7137aea788af5fa (patch)
tree67a54cba06f7b1c2e6e1d63fdbd1a5940c3bf6ee /views/widget
parent521c9dc4bf91b6563f5a1fd8bb951ad20f537506 (diff)
downloadchromium_src-394337cffb08b083513f3f93c7137aea788af5fa.zip
chromium_src-394337cffb08b083513f3f93c7137aea788af5fa.tar.gz
chromium_src-394337cffb08b083513f3f93c7137aea788af5fa.tar.bz2
Fix a Chrome crash, which occurs in a ChromeFrame instance in the destructor of the WidgetWin object for
the ExternalTabContainer. Basically the crash happens while dereferencing the chrome ui message loop which has been destroyed. This could happen in a ChromeFrame instance as the message loop is destroyed when the module ref count drops to 0. The ref count is decremented in the destructor of the AutomationProvider which runs before the Widgetwin destructor. Fix is to move the code in the WidgetWin destructor to the code which processes WM_NCDESTROY Fixes bug http://code.google.com/p/chromium/issues/detail?id=37163 Bug=37163 Review URL: http://codereview.chromium.org/663001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget_win.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 8a97b34..5fb5cf8 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -59,7 +59,6 @@ WidgetWin::WidgetWin()
}
WidgetWin::~WidgetWin() {
- MessageLoopForUI::current()->RemoveObserver(this);
}
// static
@@ -1180,8 +1179,10 @@ LRESULT WidgetWin::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
// Otherwise we handle everything else.
if (!ProcessWindowMessage(window, message, w_param, l_param, result))
result = DefWindowProc(window, message, w_param, l_param);
- if (message == WM_NCDESTROY)
+ if (message == WM_NCDESTROY) {
+ MessageLoopForUI::current()->RemoveObserver(this);
OnFinalMessage(window);
+ }
if (message == WM_ACTIVATE)
PostProcessActivateMessage(this, LOWORD(w_param));
if (message == WM_ENABLE && restore_focus_when_enabled_) {