Bug 1526971 - Revert over-zealous error checking in nsDataObj::GetDownloadDetails() from bug 571074. r=mats
authorJorg K <jorgk@jorgk.com>
Mon, 11 Feb 2019 15:44:00 +0200
changeset 458694 bf40d50fa8af
parent 458693 8b2e8f177263
child 458695 4f7935bfb0eb
push id35544
push userccoroiu@mozilla.com
push dateTue, 12 Feb 2019 16:29:08 +0000
treeherdermozilla-central@c849fb69e2e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1526971, 571074
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526971 - Revert over-zealous error checking in nsDataObj::GetDownloadDetails() from bug 571074. r=mats
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;