Bug 1300007 - Don't close a stream in an assertion. r=baku.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Sep 2016 16:10:02 +1000
changeset 312378 d6246f5ede4a75deda1b0294be758cb4aad855de
parent 312377 5ad925dd2e4e9f6943b228f0173d01278a74c2a8
child 312379 f514d79fe0679a7c565bacc90b2d21e62cbf8de2
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1300007
milestone51.0a1
Bug 1300007 - Don't close a stream in an assertion. r=baku. Because assertions disappear in non-debug builds.
dom/ipc/Blob.cpp
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -1599,17 +1599,18 @@ private:
 
     // Going to always release here.
     nsCOMPtr<nsIInputStream> stream;
     mStream.swap(stream);
 
     nsCOMPtr<nsIThread> ioTarget;
     mIOTarget.swap(ioTarget);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(stream->Close()), "Failed to close stream!");
+    DebugOnly<nsresult> rv = stream->Close();
+    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to close stream!");
 
     MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(NewRunnableMethod(ioTarget, &nsIThread::Shutdown)));
 
     return NS_OK;
   }
 
   nsresult
   SendResponse()