Bug 801471 - Failed to convert nsresult to HRESULT in nsDataObj.cpp on windows build. r=jmathies
authorOleg Romashin <romaxa@gmail.com>
Sun, 14 Oct 2012 23:20:49 -0700
changeset 110279 25f31c96a280e64a5cea3e7f2bc828d49ca82494
parent 110278 9ec5186031b086655d04cc434cbbe1fc6befc8db
child 110280 8c6f15a776956da96b9a684dc7d9472a7a432f8d
push id23680
push useremorley@mozilla.com
push dateTue, 16 Oct 2012 08:09:24 +0000
treeherdermozilla-central@8f145599e4bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs801471
milestone19.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 801471 - Failed to convert nsresult to HRESULT in nsDataObj.cpp on windows build. r=jmathies
widget/windows/nsDataObj.cpp
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -307,17 +307,17 @@ HRESULT nsDataObj::CreateStream(IStream 
   NS_ENSURE_TRUE(outStream, E_INVALIDARG);
 
   nsresult rv = NS_ERROR_FAILURE;
   nsAutoString wideFileName;
   nsCOMPtr<nsIURI> sourceURI;
 
   rv = GetDownloadDetails(getter_AddRefs(sourceURI),
                           wideFileName);
-  NS_ENSURE_SUCCESS(rv, rv);
+  NS_ENSURE_SUCCESS(rv, E_FAIL);
 
   nsDataObj::CStream *pStream = new nsDataObj::CStream();
   NS_ENSURE_TRUE(pStream, E_OUTOFMEMORY);
 
   pStream->AddRef();
 
   rv = pStream->Init(sourceURI);
   if (NS_FAILED(rv))
@@ -1106,20 +1106,20 @@ nsDataObj :: GetFileContentsInternetShor
   nsCOMPtr<nsIURI> aUri;
   NS_NewURI(getter_AddRefs(aUri), url);
 
   nsAutoString aUriHash;
 
   mozilla::widget::FaviconHelper::ObtainCachedIconFile(aUri, aUriHash, mIOThread, true);
 
   nsresult rv = mozilla::widget::FaviconHelper::GetOutputIconPath(aUri, icoFile, true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  NS_ENSURE_SUCCESS(rv, E_FAIL);
   nsCString path;
   rv = icoFile->GetNativePath(path);
-  NS_ENSURE_SUCCESS(rv, rv);
+  NS_ENSURE_SUCCESS(rv, E_FAIL);
 
   static char* shortcutFormatStr = "[InternetShortcut]\r\nURL=%s\r\n" 
                                    "IDList=\r\nHotKey=0\r\nIconFile=%s\r\n" 
                                    "IconIndex=0\r\n";
   static const int formatLen = strlen(shortcutFormatStr) - 2*2; // don't include %s (2 times) in the len
   const int totalLen = formatLen + asciiUrl.Length() 
                        + path.Length(); // we don't want a null character on the end