diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 21:27:47 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 21:27:47 +0000 |
commit | 6d47e4ba65c3f1a9344e0bc8e7bafc8092035de3 (patch) | |
tree | 174ed157b8d817c6fea8fe2edc0e2d75c7707ddf | |
parent | e43dd64094a0b14d27a9601110e126a5af88f625 (diff) | |
download | chromium_src-6d47e4ba65c3f1a9344e0bc8e7bafc8092035de3.zip chromium_src-6d47e4ba65c3f1a9344e0bc8e7bafc8092035de3.tar.gz chromium_src-6d47e4ba65c3f1a9344e0bc8e7bafc8092035de3.tar.bz2 |
Speculative fix for a chromebot crash since I can't reproduce it
locally.
When shutting down the browser with a download shelf, we first
release the shelf (see BUG=13681 for details) but we are still
part of the view hierarchy. A little later in the shutdown, the
shelf's parent (BrowserView) will dereference the already deleted
shelf through its View base class, which I believe is the source
of the Chromebot crash.
BUG=14171 (http://crbug.com/14171)
TEST=Chromebot should not crash
Review URL: http://codereview.chromium.org/126228
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18532 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/download_shelf_view.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/download_shelf_view.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc index be13d68..723f60c 100644 --- a/chrome/browser/views/download_shelf_view.cc +++ b/chrome/browser/views/download_shelf_view.cc @@ -77,6 +77,10 @@ DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent) Init(); } +DownloadShelfView::~DownloadShelfView() { + parent_->RemoveChildView(this); +} + void DownloadShelfView::Init() { ResourceBundle &rb = ResourceBundle::GetSharedInstance(); arrow_image_ = new views::ImageView(); diff --git a/chrome/browser/views/download_shelf_view.h b/chrome/browser/views/download_shelf_view.h index e11d468..8b72aab 100644 --- a/chrome/browser/views/download_shelf_view.h +++ b/chrome/browser/views/download_shelf_view.h @@ -35,6 +35,7 @@ class DownloadShelfView : public DownloadShelf, public AnimationDelegate { public: explicit DownloadShelfView(Browser* browser, BrowserView* parent); + virtual ~DownloadShelfView(); // Implementation of View. virtual gfx::Size GetPreferredSize(); |