diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 16:57:58 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 16:57:58 +0000 |
commit | 0eb25f7fc32e838b5ea563014383a5348742e4b9 (patch) | |
tree | ee9910b20e609d2f3be912deda5abdaaa92a21f0 | |
parent | 36678a0f39ff2a03c5c44e92c4b9dffd46b3d211 (diff) | |
download | chromium_src-0eb25f7fc32e838b5ea563014383a5348742e4b9.zip chromium_src-0eb25f7fc32e838b5ea563014383a5348742e4b9.tar.gz chromium_src-0eb25f7fc32e838b5ea563014383a5348742e4b9.tar.bz2 |
The dialog delegate for the in-progress download warning was deleted twice. It is the content view for the dialog and as such is automatically deleted when the dialog is closed.
So it does not need to delete itself on the DeleteDelegate() callback.
We were also leaking the label_.
BUG=9959
TEST=Start a big download, close the browser while the download is in progress. A dialog pops-up. Try the close button. The browser should close (and not crash!). Try again but this time with "Wait for donwloads to finish".
Review URL: http://codereview.chromium.org/66038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13515 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 260b891..5bc5512 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -209,10 +209,12 @@ class DownloadInProgressConfirmDialogDelegate : public views::DialogDelegate, label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); label_->set_border(views::Border::CreateEmptyBorder(10, 10, 10, 10)); AddChildView(label_); - SetParentOwned(false); SetLayoutManager(new views::FillLayout()); } + ~DownloadInProgressConfirmDialogDelegate() { + } + // View implementation: virtual gfx::Size GetPreferredSize() { const int kContentWidth = 400; @@ -243,10 +245,6 @@ class DownloadInProgressConfirmDialogDelegate : public views::DialogDelegate, return true; } - virtual void DeleteDelegate() { - delete this; - } - // WindowDelegate implementation: virtual bool IsModal() const { return true; } |