| Index: content/browser/download/download_item_impl.cc
|
| diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
|
| index d0984add840f7819230ee1b52fbbf8977952da43..0c814a4547b08f2da071bf46d7d38e5776fb22dc 100644
|
| --- a/content/browser/download/download_item_impl.cc
|
| +++ b/content/browser/download/download_item_impl.cc
|
| @@ -821,7 +821,7 @@ void DownloadItemImpl::Interrupt(content::DownloadInterruptReason reason) {
|
| // interrupts to race with cancels.
|
|
|
| // Whatever happens, the first one to hit the UI thread wins.
|
| - if (state_ != IN_PROGRESS_INTERNAL)
|
| + if (state_ != IN_PROGRESS_INTERNAL && state_ != COMPLETING_INTERNAL)
|
| return;
|
|
|
| last_reason_ = reason;
|
| @@ -1090,7 +1090,12 @@ void DownloadItemImpl::OnDownloadRenamedToFinalName(
|
| TransitionTo(COMPLETING_INTERNAL);
|
| }
|
|
|
| -void DownloadItemImpl::OnDownloadFileReleased() {
|
| +void DownloadItemImpl::OnDownloadFileReleased(
|
| + content::DownloadInterruptReason reason) {
|
| + if (content::DOWNLOAD_INTERRUPT_REASON_NONE != reason) {
|
| + Interrupt(reason);
|
| + return;
|
| + }
|
| if (delegate_->ShouldOpenDownload(this))
|
| Completed();
|
| else
|
|
|