Backed out changeset 067897f212ac (bug 1381748)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 26 Jul 2017 14:44:32 +0200
changeset 420000 299ae6eb5ec1b1be01a5a321c50aacfe8a62fbcf
parent 419999 19f1250e37cdaafb4b608f2f4c188da3d20e5bef
child 420001 fa20618aedb51f9a1d0763bc5ddfdd860af1f5a2
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1381748
milestone56.0a1
backs out067897f212ac50c81efb30aadd98cd01b103c901
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 067897f212ac (bug 1381748)
dom/fetch/FetchConsumer.cpp
dom/fetch/FetchConsumer.h
--- a/dom/fetch/FetchConsumer.cpp
+++ b/dom/fetch/FetchConsumer.cpp
@@ -338,17 +338,17 @@ FetchBodyConsumer<Derived>::Create(nsIGl
 
   RefPtr<FetchBodyConsumer<Derived>> consumer =
     new FetchBodyConsumer<Derived>(aMainThreadEventTarget, aGlobal,
                                    workerPrivate, aBody, bodyStream, promise,
                                    aType);
 
   if (!NS_IsMainThread()) {
     MOZ_ASSERT(workerPrivate);
-    if (NS_WARN_IF(!consumer->RegisterWorkerHolder())) {
+    if (NS_WARN_IF(!consumer->RegisterWorkerHolder(workerPrivate))) {
       aRv.Throw(NS_ERROR_FAILURE);
       return nullptr;
     }
   } else {
     nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
     if (NS_WARN_IF(!os)) {
       aRv.Throw(NS_ERROR_FAILURE);
       return nullptr;
@@ -446,25 +446,25 @@ template <class Derived>
 void
 FetchBodyConsumer<Derived>::AssertIsOnTargetThread() const
 {
   MOZ_ASSERT(NS_GetCurrentThread() == mTargetThread);
 }
 
 template <class Derived>
 bool
-FetchBodyConsumer<Derived>::RegisterWorkerHolder()
+FetchBodyConsumer<Derived>::RegisterWorkerHolder(WorkerPrivate* aWorkerPrivate)
 {
-  MOZ_ASSERT(mWorkerPrivate);
-  mWorkerPrivate->AssertIsOnWorkerThread();
+  MOZ_ASSERT(aWorkerPrivate);
+  aWorkerPrivate->AssertIsOnWorkerThread();
 
   MOZ_ASSERT(!mWorkerHolder);
   mWorkerHolder.reset(new FetchBodyWorkerHolder<Derived>(this));
 
-  if (!mWorkerHolder->HoldWorker(mWorkerPrivate, Closing)) {
+  if (!mWorkerHolder->HoldWorker(aWorkerPrivate, Closing)) {
     NS_WARNING("Failed to add workerHolder");
     mWorkerHolder = nullptr;
     return false;
   }
 
   return true;
 }
 
--- a/dom/fetch/FetchConsumer.h
+++ b/dom/fetch/FetchConsumer.h
@@ -81,17 +81,17 @@ private:
                     FetchConsumeType aType);
 
   ~FetchBodyConsumer();
 
   void
   AssertIsOnTargetThread() const;
 
   bool
-  RegisterWorkerHolder();
+  RegisterWorkerHolder(workers::WorkerPrivate* aWorkerPrivate);
 
   nsCOMPtr<nsIThread> mTargetThread;
   nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
 
 #ifdef DEBUG
   // This is used only to check if the body has been correctly consumed.
   RefPtr<FetchBody<Derived>> mBody;
 #endif