Bug 1547108 - Remove warnings where we expect failures in nsJARChannel. r=mayhemer
authorEric Rahm <erahm@mozilla.com>
Thu, 29 Aug 2019 16:38:34 +0000
changeset 554435 070942b0a6d2612d6bc8eb637e8e12401db50e58
parent 554434 a4768bd82d57d0560d9f55750d0dc61822d4138d
child 554436 daa065a75302e1d5aebbc5270cc50d6243aa7d3a
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1547108
milestone70.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 1547108 - Remove warnings where we expect failures in nsJARChannel. r=mayhemer Differential Revision: https://phabricator.services.mozilla.com/D43828
modules/libjar/nsJARChannel.cpp
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -363,17 +363,17 @@ nsresult CreateLocalJarInput(nsIZipReade
   }
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   RefPtr<nsJARInputThunk> input =
       new nsJARInputThunk(reader, aJarURI, aJarEntry, aJarCache != nullptr);
   rv = input->Init();
-  if (NS_WARN_IF(NS_FAILED(rv))) {
+  if (NS_FAILED(rv)) {
     return rv;
   }
 
   input.forget(aResultInput);
   return NS_OK;
 }
 
 nsresult nsJARChannel::OpenLocalFile() {
@@ -986,17 +986,19 @@ nsJARChannel::GetZipEntry(nsIZipEntry** 
 
 NS_IMETHODIMP
 nsJARChannel::OnStartRequest(nsIRequest* req) {
   LOG(("nsJARChannel::OnStartRequest [this=%p %s]\n", this, mSpec.get()));
 
   mRequest = req;
   nsresult rv = mListener->OnStartRequest(this);
   mRequest = nullptr;
-  NS_ENSURE_SUCCESS(rv, rv);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
 
   // Restrict loadable content types.
   nsAutoCString contentType;
   GetContentType(contentType);
   auto contentPolicyType = mLoadInfo->GetExternalContentPolicyType();
   if (contentType.Equals(APPLICATION_HTTP_INDEX_FORMAT) &&
       contentPolicyType != nsIContentPolicy::TYPE_DOCUMENT &&
       contentPolicyType != nsIContentPolicy::TYPE_FETCH) {