summaryrefslogtreecommitdiffstats
path: root/toolkit/components
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-03-29 05:06:50 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-03-29 05:07:36 -0400
commit61d3be47459f5edf9cee7593da6475263ef30721 (patch)
tree6ed068df50e74262fe211b23dc5c51994c87e43b /toolkit/components
parent0750e2d3c9075bc5cadc0a706e667acda041dd5b (diff)
downloadUXP-61d3be47459f5edf9cee7593da6475263ef30721.tar
UXP-61d3be47459f5edf9cee7593da6475263ef30721.tar.gz
UXP-61d3be47459f5edf9cee7593da6475263ef30721.tar.lz
UXP-61d3be47459f5edf9cee7593da6475263ef30721.tar.xz
UXP-61d3be47459f5edf9cee7593da6475263ef30721.zip
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
Diffstat (limited to 'toolkit/components')
-rw-r--r--toolkit/components/downloads/nsDownloadManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
index 9f43ade2c..587c1ac8a 100644
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -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);
}