Backed out changeset 0d5cc353d9e0 a=crashes
authorJason Duell <jduell.mcbugs@gmail.com>
Thu, 26 May 2016 23:07:57 -0700
changeset 340281 7f39530aedecac428b124189406ab40536a730bf
parent 340280 f10f4b5ce594dd6004b5de023b4e53782ed9c0d5
child 340282 919296e383f6802ec3c3d54f9b39e3498c8d5fba
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscrashes
milestone49.0a1
backs out0d5cc353d9e014cba6dcc90cff10b7c2c17df5ea
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 0d5cc353d9e0 a=crashes
netwerk/base/nsStreamListenerTee.cpp
netwerk/base/nsStreamListenerWrapper.h
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/base/nsStreamListenerTee.cpp
+++ b/netwerk/base/nsStreamListenerTee.cpp
@@ -44,20 +44,19 @@ nsStreamListenerTee::OnStopRequest(nsIRe
     if (mEventTarget) {
       NS_ProxyRelease(mEventTarget, mSink.forget());
     }
     else {
         mSink = 0;
     }
 
     nsresult rv = mListener->OnStopRequest(request, context, status);
-    mListener = nullptr;
     if (mObserver)
         mObserver->OnStopRequest(request, context, status);
-    mObserver = nullptr;
+    mObserver = 0;
     return rv;
 }
 
 NS_IMETHODIMP
 nsStreamListenerTee::OnDataAvailable(nsIRequest *request,
                                      nsISupports *context,
                                      nsIInputStream *input,
                                      uint64_t offset,
--- a/netwerk/base/nsStreamListenerWrapper.h
+++ b/netwerk/base/nsStreamListenerWrapper.h
@@ -22,34 +22,20 @@ class nsStreamListenerWrapper final : pu
 public:
   explicit nsStreamListenerWrapper(nsIStreamListener *listener)
     : mListener(listener)
   {
     NS_ASSERTION(mListener, "no stream listener specified");
   }
 
   NS_DECL_ISUPPORTS
+  NS_FORWARD_NSIREQUESTOBSERVER(mListener->)
   NS_FORWARD_NSISTREAMLISTENER(mListener->)
   NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
 
-  //  Don't use NS_FORWARD_NSIREQUESTOBSERVER(mListener->) here, because we need
-  //  to release mListener in OnStopRequest, and IDL-generated function doesn't.
-  NS_IMETHOD OnStartRequest(nsIRequest *aRequest,
-                            nsISupports *aContext) override
-  {
-    return mListener->OnStartRequest(aRequest, aContext);
-  }
-  NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
-                           nsresult aStatusCode) override
-  {
-    nsresult rv = mListener->OnStopRequest(aRequest, aContext, aStatusCode);
-    mListener = nullptr;
-    return rv;
-  }
-
 private:
   ~nsStreamListenerWrapper() {}
   nsCOMPtr<nsIStreamListener> mListener;
 };
 
 } // namespace net
 } // namespace mozilla
 
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6229,17 +6229,16 @@ nsHttpChannel::OnStopRequest(nsIRequest 
         // if this transaction has been replaced, then bail.
         if (mTransactionReplaced)
             return NS_OK;
 
         if (mUpgradeProtocolCallback && stickyConn &&
             mResponseHead && mResponseHead->Status() == 101) {
             gHttpHandler->ConnMgr()->CompleteUpgrade(stickyConn,
                                                      mUpgradeProtocolCallback);
-            mUpgradeProtocolCallback = nullptr;
         }
     }
 
     // if needed, check cache entry has all data we expect
     if (mCacheEntry && mCachePump &&
         mConcurentCacheAccess && contentComplete) {
         int64_t size, contentLength;
         nsresult rv = CheckPartial(mCacheEntry, &size, &contentLength);