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

Unified Diff: chrome/browser/cocoa/download_item_controller.mm

Issue 431019: Fix to prevent selecting a popup menu item from crashing when the item is aut... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_controller.mm
===================================================================
--- chrome/browser/cocoa/download_item_controller.mm (revision 32802)
+++ chrome/browser/cocoa/download_item_controller.mm (working copy)
@@ -203,9 +203,11 @@
else if (download->state() == DownloadItem::COMPLETE)
download_util::OpenDownload(download);
} else {
+ // Hold a reference in case the download completes and we're auto-removed.
pink (ping after 24hrs) 2009/11/24 15:06:02 expand on what "auto-removing" is.
+ scoped_nsobject<DownloadItemController> ref([self retain]);
[NSMenu popUpContextMenu:currentMenu_
- withEvent:[NSApp currentEvent]
- forView:progressView_];
+ withEvent:[NSApp currentEvent]
+ forView:progressView_];
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698