Bug 1602986 - Get rid of NS_WARN_IF warnings in nsSegmentedBuffer::FreeOMT r=froydnj
authorKristen Wright <kwright@mozilla.com>
Wed, 29 Jan 2020 10:03:34 +0000
changeset 512057 b03b06ab62f98775e64f9c5cec376958efe62fda
parent 512056 9db68c522c02b09937af365df9c3781649a0514b
child 512058 22bcd089e7abb94be14e4800eacbc10fc69e8d59
push id37068
push usernerli@mozilla.com
push dateWed, 29 Jan 2020 15:51:04 +0000
treeherdermozilla-central@019ae805259f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1602986
milestone74.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 1602986 - Get rid of NS_WARN_IF warnings in nsSegmentedBuffer::FreeOMT r=froydnj At shutdown, the stream transport service is not available and `free(aPtr)` happens synchronously. These warnings will always trigger and produce a lot of logspam. Differential Revision: https://phabricator.services.mozilla.com/D61217
xpcom/io/nsSegmentedBuffer.cpp
--- a/xpcom/io/nsSegmentedBuffer.cpp
+++ b/xpcom/io/nsSegmentedBuffer.cpp
@@ -157,15 +157,14 @@ void nsSegmentedBuffer::FreeOMT(void* aP
                                                    [aPtr]() { free(aPtr); });
 
   if (!mIOThread) {
     mIOThread = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
   }
 
   // During the shutdown we are not able to obtain the IOThread and/or the
   // dispatching of runnable fails.
-  if (NS_WARN_IF(!mIOThread) ||
-      NS_WARN_IF(NS_FAILED(mIOThread->Dispatch(r.forget())))) {
+  if (!mIOThread || NS_FAILED(mIOThread->Dispatch(r.forget()))) {
     free(aPtr);
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////