Bug 1224326 - CRASH when pause -> continue download several times - fix UI after retry. r=frg a=frg DONTBUILD CLOSED TREE SEAMONKEY_2_49_ESR_RELBRANCH
authorIan Neal <iann_cvs@blueyonder.co.uk>
Mon, 15 Jul 2019 18:08:01 +0200
branchSEAMONKEY_2_49_ESR_RELBRANCH
changeset 357572 3562796c356716fbed4db33b9ea77d72fc639f04
parent 357571 8a53acedcb5a9675044bcee05ea67f672fd54e5b
child 357573 dc52d89bf6d8ff2cc8fa9a1c38b4088eafbda6a3
push id7836
push userfrgrahl@gmx.net
push dateMon, 15 Jul 2019 16:17:02 +0000
treeherdermozilla-esr52@3a4afe7ecac5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1224326
milestone52.9.1
Bug 1224326 - CRASH when pause -> continue download several times - fix UI after retry. r=frg a=frg DONTBUILD CLOSED TREE SeaMonkey ESR52 release branch only.
toolkit/components/downloads/nsDownloadManager.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -1842,16 +1842,19 @@ nsDownloadManager::RetryDownload(nsDownl
   // If the download has failed and is resumable then we first try resuming it
   nsresult rv;
   if (dl->mDownloadState == nsIDownloadManager::DOWNLOAD_FAILED && dl->IsResumable()) {
     rv = dl->Resume();
     if (NS_SUCCEEDED(rv))
       return rv;
   }
 
+  rv = NotifyDownloadRemoval(dl);
+  NS_ENSURE_SUCCESS(rv, rv);
+
   // reset time and download progress
   dl->SetStartTime(PR_Now());
   dl->SetProgressBytes(0, -1);
 
   nsCOMPtr<nsIWebBrowserPersist> wbp =
     do_CreateInstance("@mozilla.org/embedding/browser/nsWebBrowserPersist;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);