mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Properly fix crash in nsDownloadManager when repeatedly pausing and resuming a download
This applies only to applications that do not use JSDownloads and is based on Bug 1224326
This commit is contained in:
parent
99d102cf2d
commit
248573ed91
1 changed files with 4 additions and 1 deletions
|
|
@ -1829,6 +1829,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);
|
||||
|
|
@ -3083,7 +3086,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…
Add table
Add a link
Reference in a new issue