Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 213018: Fix a crash canceling a completed, auto-opened download (Closed)

Created:
11 years, 3 months ago by Paul Godavari
Modified:
9 years, 7 months ago
Reviewers:
jcampan
CC:
chromium-reviews_googlegroups.com, Paul Godavari, Ben Goodger (Google)
Visibility:
Public.

Description

Fix a crash canceling a completed, auto-opened download. To reproduce this crash: 1. Set 'Always open files of this type' on the download shelf menu to checked for a particular file type. 2. Download a large file of that type. 3. Before the download completes, open its context menu on the shelf. 4. When the download completes, select 'Cancel' from the menu. 5. Crash. The crash occurs because auto-opened downloads automatically remove (and thus delete) themselves from the shelf even if the menu is still running. Selecting a menu item at this point will attempt to access the deleted object. The fix is to let the menu know when the calling object is becoming invalid, so we can avoid doing any further work. BUG=20810 TEST=Try the above repro steps and notice that Chrome doesn't crash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26589

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -8 lines) Patch
M chrome/browser/views/download_item_view.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/views/download_item_view.cc View 5 chunks +37 lines, -8 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Paul Godavari
11 years, 3 months ago (2009-09-18 02:00:52 UTC) #1
jcampan
11 years, 3 months ago (2009-09-18 16:56:45 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698