Bug 1169867 - nsXMLHttpRequest should use and free mProxy correctly. r=ehsan, a=abillings
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 04 Jun 2015 15:04:09 +0100
changeset 273437 9864769ebb1e16cecee37aefc1fd94cd4859b3fe
parent 273436 34cc0e31bdb696a8636e57ada04e7fa319c481d9
child 273438 f1515be9e8828b9ead0a55f9240f571233f46bc1
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, abillings
bugs1169867
milestone40.0a2
Bug 1169867 - nsXMLHttpRequest should use and free mProxy correctly. r=ehsan, a=abillings
dom/workers/XMLHttpRequest.cpp
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -1939,18 +1939,18 @@ XMLHttpRequest::Open(const nsACString& a
 
   nsRefPtr<OpenRunnable> runnable =
     new OpenRunnable(mWorkerPrivate, mProxy, aMethod, aUrl, aUser, aPassword,
                      mBackgroundRequest, mWithCredentials,
                      mTimeout);
 
   mProxy->mOpening = true;
   if (!runnable->Dispatch(mWorkerPrivate->GetJSContext())) {
+    mProxy->mOpening = false;
     ReleaseProxy();
-    mProxy->mOpening = false;
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   mProxy->mOpening = false;
   mProxy->mIsSyncXHR = !aAsync;
 }