Commit 3ddb6c86 authored by Min Qin's avatar Min Qin Committed by Commit Bot

Fix an issue that DownloadFilePicker is not calling LisenerDestroyed in dtor

DownloadFilePicker is a lisener of SelectFileDialog.
When it creates a SelectFileDialog, it should inform the latter
when it is killed.
Otherwise, SelectFileDialog might hit NPE when calling the listener method.

BUG=818066

Change-Id: Idc5e67b5cba9eac5f72b8e7a2df1ca70f2adbd8e
Reviewed-on: https://chromium-review.googlesource.com/949099Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarJoy Ming <jming@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541013}
parent c8bccdf1
...@@ -99,6 +99,8 @@ DownloadFilePicker::DownloadFilePicker(DownloadItem* item, ...@@ -99,6 +99,8 @@ DownloadFilePicker::DownloadFilePicker(DownloadItem* item,
} }
DownloadFilePicker::~DownloadFilePicker() { DownloadFilePicker::~DownloadFilePicker() {
if (select_file_dialog_)
select_file_dialog_->ListenerDestroyed();
} }
void DownloadFilePicker::OnFileSelected(const base::FilePath& path) { void DownloadFilePicker::OnFileSelected(const base::FilePath& path) {
......
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