Backed out the code changes from changeset c16ed656a43b (bug 1113340) since bug 701634 didn't land on Gecko 36.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 22 Jan 2015 14:19:46 -0500
changeset 242992 e8effa80da5b
parent 242991 8a2a86c11f7c
child 242993 a6e5dedbd0c0
push id4357
push userryanvm@gmail.com
push date2015-01-22 19:21 +0000
treeherdermozilla-beta@3096b7b44265 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1113340, 701634
milestone36.0
Backed out the code changes from changeset c16ed656a43b (bug 1113340) since bug 701634 didn't land on Gecko 36.
dom/ipc/Blob.cpp
dom/workers/URL.cpp
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -2152,18 +2152,16 @@ CreateStreamHelper::GetStream(nsIInputSt
 
   nsRefPtr<RemoteBlobImpl> baseRemoteBlobImpl =
     mRemoteBlobImpl->BaseRemoteBlobImpl();
   MOZ_ASSERT(baseRemoteBlobImpl);
 
   if (EventTargetIsOnCurrentThread(baseRemoteBlobImpl->GetActorEventTarget())) {
     RunInternal(baseRemoteBlobImpl, false);
   } else {
-    MOZ_ASSERT(!NS_IsMainThread());
-
     nsCOMPtr<nsIEventTarget> target = baseRemoteBlobImpl->GetActorEventTarget();
     if (!target) {
       target = do_GetMainThread();
     }
 
     MOZ_ASSERT(target);
 
     nsresult rv = target->Dispatch(this, NS_DISPATCH_NORMAL);
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -8,19 +8,16 @@
 #include "nsIDocument.h"
 #include "nsIIOService.h"
 #include "nsPIDOMWindow.h"
 
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/URL.h"
 #include "mozilla/dom/URLBinding.h"
 #include "mozilla/dom/URLSearchParams.h"
-#include "mozilla/dom/ipc/BlobChild.h"
-#include "mozilla/dom/ipc/nsIRemoteBlob.h"
-#include "mozilla/ipc/BackgroundChild.h"
 #include "nsGlobalWindow.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "nsNetCID.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
@@ -81,44 +78,18 @@ public:
     mURL(aURL)
   {
     MOZ_ASSERT(aBlobImpl);
   }
 
   bool
   MainThreadRun()
   {
-    using namespace mozilla::ipc;
-
     AssertIsOnMainThread();
 
-    nsRefPtr<FileImpl> newBlobImplHolder;
-
-    if (nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(mBlobImpl)) {
-      if (BlobChild* blobChild = remoteBlob->GetBlobChild()) {
-        if (PBackgroundChild* blobManager = blobChild->GetBackgroundManager()) {
-          PBackgroundChild* backgroundManager =
-            BackgroundChild::GetForCurrentThread();
-          MOZ_ASSERT(backgroundManager);
-
-          if (blobManager != backgroundManager) {
-            // Always make sure we have a blob from an actor we can use on this
-            // thread.
-            blobChild = BlobChild::GetOrCreate(backgroundManager, mBlobImpl);
-            MOZ_ASSERT(blobChild);
-
-            newBlobImplHolder = blobChild->GetBlobImpl();
-            MOZ_ASSERT(newBlobImplHolder);
-
-            mBlobImpl = newBlobImplHolder;
-          }
-        }
-      }
-    }
-
     nsCOMPtr<nsIPrincipal> principal;
     nsIDocument* doc = nullptr;
 
     nsCOMPtr<nsPIDOMWindow> window = mWorkerPrivate->GetWindow();
     if (window) {
       doc = window->GetExtantDoc();
       if (!doc) {
         SetDOMStringToNull(mURL);