Backed out changeset 6a0f2b93749a (bug 1242597) for leaksanitizer failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 18 Aug 2016 12:41:12 -0700
changeset 353664 2d4a3ed753407f210a3a0268691e1be38280420a
parent 353663 bbbadfa14ef1611937db1311afa33f3a02030338
child 353665 7d3bc3efebe0730a8f8d560ca5c07eb2501d74ad
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1242597
milestone51.0a1
backs out6a0f2b93749a4adafba030aa0522ebd7255bbce8
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
Backed out changeset 6a0f2b93749a (bug 1242597) for leaksanitizer failures a=backout
netwerk/base/nsSocketTransport2.cpp
netwerk/base/nsSocketTransport2.h
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -470,21 +470,17 @@ nsSocketInputStream::AsyncWait(nsIInputS
                                uint32_t amount,
                                nsIEventTarget *target)
 {
     SOCKET_LOG(("nsSocketInputStream::AsyncWait [this=%p]\n", this));
 
     bool hasError = false;
     {
         MutexAutoLock lock(mTransport->mLock);
-        if (mTransport->mState != nsSocketTransport::STATE_TRANSFERRING && NS_FAILED(mCondition)) {
-            SOCKET_LOG(("nsSocketInputStream::AsyncWait [this=%p] "
-                        "Not Transferring %X.\n", mTransport, mCondition));
-            return NS_OK;
-        }
+
         if (callback && target) {
             //
             // build event proxy
             //
             mCallback = NS_NewInputStreamReadyEvent(callback, target);
         }
         else
             mCallback = callback;
@@ -708,22 +704,17 @@ nsSocketOutputStream::AsyncWait(nsIOutpu
                                 uint32_t flags,
                                 uint32_t amount,
                                 nsIEventTarget *target)
 {
     SOCKET_LOG(("nsSocketOutputStream::AsyncWait [this=%p]\n", this));
 
     {
         MutexAutoLock lock(mTransport->mLock);
-        if (mTransport->mState != nsSocketTransport::STATE_TRANSFERRING && NS_FAILED(mCondition)) {
-            // do not take the callback reference if we will not call onOutputReady
-            SOCKET_LOG(("nsSocketOutputStream::AsyncWait [this=%p] mTransport=%p "
-                        "Not Transferring %X.\n",this, mTransport, mCondition));
-            return NS_OK;
-        }
+
         if (callback && target) {
             //
             // build event proxy
             //
             mCallback = NS_NewOutputStreamReadyEvent(callback, target);
         }
         else
             mCallback = callback;
--- a/netwerk/base/nsSocketTransport2.h
+++ b/netwerk/base/nsSocketTransport2.h
@@ -193,16 +193,17 @@ private:
         MSG_INPUT_PENDING,
         MSG_OUTPUT_CLOSED,
         MSG_OUTPUT_PENDING
     };
     nsresult PostEvent(uint32_t type, nsresult status = NS_OK, nsISupports *param = nullptr);
 
     enum {
         STATE_CLOSED,
+        STATE_IDLE,
         STATE_RESOLVING,
         STATE_CONNECTING,
         STATE_TRANSFERRING
     };
 
     // Safer way to get and automatically release PRFileDesc objects.
     class MOZ_STACK_CLASS PRFileDescAutoLock
     {