From 7bc6cc9d4103d3a2087c719f18347f79b66bedf0 Mon Sep 17 00:00:00 2001 From: "ncj674@motorola.com" Date: Sun, 25 Sep 2011 17:12:35 +0000 Subject: Browser crashes while closing download shelf if menu is open BUG=97724 TEST=1.Download a file, download shelf is shown 2.Click on the downloaded file after download completes. and quickly open the menu (the down arrow button) 3.Download shelf and menu should close itself and browser should not crash. Review URL: http://codereview.chromium.org/8016001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102682 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/gtk/download/download_item_gtk.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc index 5f9218e..0dc332f 100644 --- a/chrome/browser/ui/gtk/download/download_item_gtk.cc +++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc @@ -266,6 +266,10 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, } DownloadItemGtk::~DownloadItemGtk() { + // First close the menu and then destroy the GtkWidgets. Bug#97724 + if (menu_.get()) + menu_.reset(); + icon_consumer_.CancelAllRequests(); StopDownloadProgress(); get_download()->RemoveObserver(this); -- cgit v1.1