Bug 1466101 - Fix a debug-only variable use in InputStreamLengthHelper, r=mayhemer
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 05 Jun 2018 23:19:00 +0200
changeset 421530 633a10eff02a2ada758db8459dc9927bbce31df5
parent 421529 b077ffd9a84dc57a0dcadaede41b7ff8760f519f
child 421531 cec4a3cecc29ff97860198969b6fdff24b9e93bb
child 421559 824b74c6269d69430a89301af2a638da0d0cd69c
push id34096
push usernbeleuzu@mozilla.com
push dateWed, 06 Jun 2018 09:37:23 +0000
treeherdermozilla-central@cec4a3cecc29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1466101
milestone62.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 1466101 - Fix a debug-only variable use in InputStreamLengthHelper, r=mayhemer
xpcom/io/InputStreamLengthHelper.cpp
--- a/xpcom/io/InputStreamLengthHelper.cpp
+++ b/xpcom/io/InputStreamLengthHelper.cpp
@@ -152,18 +152,20 @@ InputStreamLengthHelper::GetAsyncLength(
   // Let's be sure that we don't call ::Available() on main-thread.
   if (NS_IsMainThread()) {
     nsCOMPtr<nsIInputStreamLength> streamLength = do_QueryInterface(aStream);
     nsCOMPtr<nsIAsyncInputStreamLength> asyncStreamLength =
       do_QueryInterface(aStream);
     if (!streamLength && !asyncStreamLength) {
       // We cannot calculate the length of an async stream. We must fix the
       // caller if this happens.
+#ifdef DEBUG
       nsCOMPtr<nsIAsyncInputStream> asyncStream = do_QueryInterface(aStream);
       MOZ_DIAGNOSTIC_ASSERT(!asyncStream);
+#endif
 
       bool nonBlocking = false;
       if (NS_SUCCEEDED(aStream->IsNonBlocking(&nonBlocking)) && !nonBlocking) {
         nsCOMPtr<nsIEventTarget> target =
           do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
         MOZ_ASSERT(target);
 
         RefPtr<AvailableEvent> event = new AvailableEvent(aStream, aCallback);