Commit e73502d8 authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Clear the download item's target on dealloc.

This fixes a crash if the download item controller goes away while the
button is tracking the mouse and then sends its action on mouse up.

Bug: 815161
Change-Id: I4ab377ca5fe190e3d95aa81b989c13c96b46f5b4
Reviewed-on: https://chromium-review.googlesource.com/957843
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542357}
parent 0fc08b4f
...@@ -122,6 +122,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { ...@@ -122,6 +122,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
- (void)dealloc { - (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
[progressView_ setController:nil]; [progressView_ setController:nil];
[progressView_ setTarget:nil];
[[self view] removeFromSuperview]; [[self view] removeFromSuperview];
[super dealloc]; [super dealloc];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment