Bug 1357219 - Don't warn if we can't use a memory mapped file. r?jld draft
authorMichael Kaply <mozilla@kaply.com>
Fri, 21 Apr 2017 15:56:34 -0500
changeset 566585 4e3ba5beb6f124a7657adf51d97e4013efae8832
parent 566568 5ed2f24d732fa54640f5c796def8b57bdfd3d316
child 625363 04dcb5a5d560685d21b9a780ccafc37bfbc939d2
push id55269
push usermozilla@kaply.com
push dateFri, 21 Apr 2017 20:56:46 +0000
reviewersjld
bugs1357219
milestone55.0a1
Bug 1357219 - Don't warn if we can't use a memory mapped file. r?jld MozReview-Commit-ID: 9ajZCLzQe4G
dom/xhr/XMLHttpRequestMainThread.cpp
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -1992,17 +1992,19 @@ XMLHttpRequestMainThread::OnStartRequest
             }
           }
           nsCOMPtr<nsIFile> jarFile;
           jarChannel->GetJarFile(getter_AddRefs(jarFile));
           if (!jarFile) {
             mIsMappedArrayBuffer = false;
           } else {
             rv = mArrayBufferBuilder.mapToFileInPackage(file, jarFile);
-            if (NS_WARN_IF(NS_FAILED(rv))) {
+            // This can happen legitimately if there are compressed files
+            // in the jarFile. See bug #1357219. No need to warn on the error.
+            if (NS_FAILED(rv)) {
               mIsMappedArrayBuffer = false;
             } else {
               channel->SetContentType(NS_LITERAL_CSTRING("application/mem-mapped"));
             }
           }
         }
       }
     }