Properly fix crash in nsDownloadManager when repeatedly pausing and resuming a download.
This commit is contained in:
parent
7c52cc8e7f
commit
57d94700ac
|
@ -1847,6 +1847,9 @@ nsDownloadManager::RetryDownload(nsDownload* dl)
|
|||
return rv;
|
||||
}
|
||||
|
||||
rv = NotifyDownloadRemoval(dl);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// reset time and download progress
|
||||
dl->SetStartTime(PR_Now());
|
||||
dl->SetProgressBytes(0, -1);
|
||||
|
@ -3124,7 +3127,7 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress,
|
|||
#else
|
||||
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);
|
||||
#endif
|
||||
} else {
|
||||
} else if (aStatus != NS_BINDING_ABORTED) {
|
||||
// We failed for some unknown reason -- fail with a generic message
|
||||
(void)FailDownload(aStatus, nullptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue