diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-24 20:56:45 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-24 20:56:45 +0000 |
commit | 92673f391bfc070e0495bce0fca4769665e7b50e (patch) | |
tree | 5328feddc050ade52f9ef4c94c625a2bd74a8062 /chrome | |
parent | 8bbab028452dfe334bad005cba3a318d6c56cc76 (diff) | |
download | chromium_src-92673f391bfc070e0495bce0fca4769665e7b50e.zip chromium_src-92673f391bfc070e0495bce0fca4769665e7b50e.tar.gz chromium_src-92673f391bfc070e0495bce0fca4769665e7b50e.tar.bz2 |
Fix task manager crash by releasing the delegate's scoped_ptr back to the window when the window is destroyed, not when the window delegate is destroyed, since some use cases recycle the delegate.
B=1333829
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/window.cc | 1 | ||||
-rw-r--r-- | chrome/views/window_delegate.cc | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc index db6174c..75bd988 100644 --- a/chrome/views/window.cc +++ b/chrome/views/window.cc @@ -336,6 +336,7 @@ void Window::OnCommand(UINT notification_code, int command_id, HWND window) { void Window::OnDestroy() { if (window_delegate_) { window_delegate_->WindowClosing(); + window_delegate_->window_.release(); window_delegate_ = NULL; } RestoreEnabledIfNecessary(); diff --git a/chrome/views/window_delegate.cc b/chrome/views/window_delegate.cc index f6021e0..d93a7bd 100644 --- a/chrome/views/window_delegate.cc +++ b/chrome/views/window_delegate.cc @@ -14,7 +14,6 @@ WindowDelegate::WindowDelegate() { } WindowDelegate::~WindowDelegate() { - window_.release(); } // Returns the icon to be displayed in the window. |