Bug 1526971 - Revert over-zealous error checking in nsDataObj::GetDownloadDetails() from bug 571074. r=mats a=lizzard
authorJorg K <jorgk@jorgk.com>
Mon, 11 Feb 2019 15:44:00 +0200
changeset 516058 8b328a01648ca83883c2de044a2e4c7154779260
parent 516057 6fec628734c8d1e2fcd72c14296424f459413e8e
child 516059 f3b5d5cc711a4d678cc9d481f1ec839a28b1fde7
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats, lizzard
bugs1526971, 571074
milestone66.0
Bug 1526971 - Revert over-zealous error checking in nsDataObj::GetDownloadDetails() from bug 571074. r=mats a=lizzard
widget/windows/nsDataObj.cpp
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -19,16 +19,17 @@
 #include "nsString.h"
 #include "nsCRT.h"
 #include "nsPrintfCString.h"
 #include "nsIStringBundle.h"
 #include "nsEscape.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "mozilla/Services.h"
+#include "mozilla/Unused.h"
 #include "nsIOutputStream.h"
 #include "nscore.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Preferences.h"
 #include "nsIContentPolicy.h"
 #include "nsContentUtils.h"
@@ -1959,19 +1960,18 @@ HRESULT nsDataObj::GetDownloadDetails(ns
   nsAutoString srcUri;
   srcUrlPrimitive->GetData(srcUri);
   if (srcUri.IsEmpty()) return E_FAIL;
   nsCOMPtr<nsIURI> sourceURI;
   NS_NewURI(getter_AddRefs(sourceURI), srcUri);
 
   nsAutoString srcFileName;
   nsCOMPtr<nsISupports> fileNamePrimitive;
-  rv = mTransferable->GetTransferData(kFilePromiseDestFilename,
-                                      getter_AddRefs(fileNamePrimitive));
-  NS_ENSURE_SUCCESS(rv, E_FAIL);
+  Unused << mTransferable->GetTransferData(kFilePromiseDestFilename,
+                                           getter_AddRefs(fileNamePrimitive));
   nsCOMPtr<nsISupportsString> srcFileNamePrimitive =
       do_QueryInterface(fileNamePrimitive);
   if (srcFileNamePrimitive) {
     srcFileNamePrimitive->GetData(srcFileName);
   } else {
     nsCOMPtr<nsIURL> sourceURL = do_QueryInterface(sourceURI);
     if (!sourceURL) return E_FAIL;