Backed out 11 changesets (bug 966439, bug 1121472) for causing widespread test failures and because inbound isn't Try and shouldn't be treated as such.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 14 Jan 2015 11:46:14 -0500
changeset 223781 ec13e4c1e1d6c26a39bc0986281e40926a52b327
parent 223780 e6cd15d43b5ae8a19031973c1cea4b64a03c0cd0
child 223782 e5fee301e66cfa4051d3a57999bbd13571f1f44c
push id28107
push userryanvm@gmail.com
push dateWed, 14 Jan 2015 21:17:38 +0000
treeherdermozilla-central@af5716d852c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs966439, 1121472
milestone38.0a1
backs oute6cd15d43b5ae8a19031973c1cea4b64a03c0cd0
4f9788639f3f1aa4086c008134ac2497601f7e66
ac9a967e5a10882182626f69715e486faf42550f
14d3227378711f1762baa5d38860fab4bf56436f
8f941e5195803d9b137adb9e84c66b809106457d
b82d1010c6b499971b70cbd8e53533adb1e27685
2c29a52a03bdeae10f265891b1c26883866063b9
e4b0802a3f061d6748a1d80d013061282ce4acaa
bdc9a031003445227cf7c6625330cd851929fd51
6b3ae19628e6770e77c3a176b23137a13e46926f
3d23e775033aab8f7cd901b014f9ba91394047a7
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 11 changesets (bug 966439, bug 1121472) for causing widespread test failures and because inbound isn't Try and shouldn't be treated as such. Backed out changeset e6cd15d43b5a (bug 1121472) Backed out changeset 4f9788639f3f (bug 966439) Backed out changeset ac9a967e5a10 (bug 966439) Backed out changeset 14d322737871 (bug 966439) Backed out changeset 8f941e519580 (bug 966439) Backed out changeset b82d1010c6b4 (bug 966439) Backed out changeset 2c29a52a03bd (bug 966439) Backed out changeset e4b0802a3f06 (bug 966439) Backed out changeset bdc9a0310034 (bug 966439) Backed out changeset 6b3ae19628e6 (bug 966439) Backed out changeset 3d23e775033a (bug 966439) CLOSED TREE
b2g/app/b2g.js
dom/base/Navigator.h
dom/broadcastchannel/BroadcastChannel.cpp
dom/broadcastchannel/BroadcastChannel.h
dom/broadcastchannel/BroadcastChannelChild.cpp
dom/broadcastchannel/BroadcastChannelChild.h
dom/broadcastchannel/BroadcastChannelParent.cpp
dom/broadcastchannel/BroadcastChannelParent.h
dom/broadcastchannel/BroadcastChannelService.cpp
dom/broadcastchannel/BroadcastChannelService.h
dom/broadcastchannel/PBroadcastChannel.ipdl
dom/broadcastchannel/moz.build
dom/broadcastchannel/tests/broadcastchannel_pref_worker.js
dom/broadcastchannel/tests/broadcastchannel_sharedWorker.js
dom/broadcastchannel/tests/broadcastchannel_worker.js
dom/broadcastchannel/tests/broadcastchannel_worker_alive.js
dom/broadcastchannel/tests/broadcastchannel_worker_any.js
dom/broadcastchannel/tests/iframe_broadcastchannel.html
dom/broadcastchannel/tests/mochitest.ini
dom/broadcastchannel/tests/test_broadcastchannel_any.html
dom/broadcastchannel/tests/test_broadcastchannel_basic.html
dom/broadcastchannel/tests/test_broadcastchannel_close.html
dom/broadcastchannel/tests/test_broadcastchannel_pref.html
dom/broadcastchannel/tests/test_broadcastchannel_self.html
dom/broadcastchannel/tests/test_broadcastchannel_sharedWorker.html
dom/broadcastchannel/tests/test_broadcastchannel_worker.html
dom/broadcastchannel/tests/test_broadcastchannel_worker_alive.html
dom/events/DOMEventTargetHelper.h
dom/events/EventListenerManager.cpp
dom/events/MessageEvent.cpp
dom/events/MessageEvent.h
dom/ipc/StructuredCloneUtils.cpp
dom/moz.build
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/BroadcastChannel.webidl
dom/webidl/moz.build
dom/workers/test/test_worker_interfaces.js
ipc/glue/BackgroundChildImpl.cpp
ipc/glue/BackgroundChildImpl.h
ipc/glue/BackgroundParentImpl.cpp
ipc/glue/BackgroundParentImpl.h
ipc/glue/PBackground.ipdl
ipc/glue/moz.build
modules/libpref/init/all.js
testing/web-platform/meta/html/dom/interfaces.html.ini
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -1063,19 +1063,16 @@ pref("identity.fxaccounts.enabled", true
 // Mobile Identity API.
 pref("services.mobileid.server.uri", "https://msisdn.services.mozilla.com");
 
 // Enable mapped array buffer.
 #ifndef XP_WIN
 pref("dom.mapped_arraybuffer.enabled", true);
 #endif
 
-// BroadcastChannel API
-pref("dom.broadcastChannel.enabled", true);
-
 // UDPSocket API
 pref("dom.udpsocket.enabled", true);
 
 // Enable TV Manager API
 pref("dom.tv.enabled", true);
 
 pref("dom.mozSettings.SettingsDB.debug.enabled", true);
 pref("dom.mozSettings.SettingsManager.debug.enabled", true);
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -317,32 +317,31 @@ public:
 
   nsPIDOMWindow* GetParentObject() const
   {
     return GetWindow();
   }
 
   virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
 
-  // GetWindowFromGlobal returns the inner window for this global, if
-  // any, else null.
-  static already_AddRefed<nsPIDOMWindow> GetWindowFromGlobal(JSObject* aGlobal);
-
 #ifdef MOZ_EME
   already_AddRefed<Promise>
   RequestMediaKeySystemAccess(const nsAString& aKeySystem,
                               const Optional<Sequence<MediaKeySystemOptions>>& aOptions,
                               ErrorResult& aRv);
 #endif
 
 private:
   virtual ~Navigator();
 
   bool CheckPermission(const char* type);
   static bool CheckPermission(nsPIDOMWindow* aWindow, const char* aType);
+  // GetWindowFromGlobal returns the inner window for this global, if
+  // any, else null.
+  static already_AddRefed<nsPIDOMWindow> GetWindowFromGlobal(JSObject* aGlobal);
 
   nsRefPtr<nsMimeTypeArray> mMimeTypes;
   nsRefPtr<nsPluginArray> mPlugins;
   nsRefPtr<Geolocation> mGeolocation;
   nsRefPtr<DesktopNotificationCenter> mNotification;
   nsRefPtr<battery::BatteryManager> mBatteryManager;
 #ifdef MOZ_B2G_FM
   nsRefPtr<FMRadio> mFMRadio;
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ /dev/null
@@ -1,802 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BroadcastChannel.h"
-#include "BroadcastChannelChild.h"
-#include "mozilla/dom/BroadcastChannelBinding.h"
-#include "mozilla/dom/Navigator.h"
-#include "mozilla/dom/StructuredCloneUtils.h"
-#include "mozilla/ipc/BackgroundChild.h"
-#include "mozilla/ipc/BackgroundUtils.h"
-#include "mozilla/ipc/PBackgroundChild.h"
-#include "mozilla/Preferences.h"
-#include "WorkerPrivate.h"
-#include "WorkerRunnable.h"
-
-#include "nsIAppsService.h"
-#include "nsIDocument.h"
-#include "nsIScriptSecurityManager.h"
-#include "nsServiceManagerUtils.h"
-#include "nsISupportsPrimitives.h"
-
-#ifdef XP_WIN
-#undef PostMessage
-#endif
-
-namespace mozilla {
-
-using namespace ipc;
-
-namespace dom {
-
-using namespace workers;
-
-class BroadcastChannelMessage MOZ_FINAL
-{
-public:
-  NS_INLINE_DECL_REFCOUNTING(BroadcastChannelMessage)
-
-  JSAutoStructuredCloneBuffer mBuffer;
-  StructuredCloneClosure mClosure;
-
-  BroadcastChannelMessage()
-  { }
-
-private:
-  ~BroadcastChannelMessage()
-  { }
-};
-
-namespace {
-
-void
-GetOrigin(nsIPrincipal* aPrincipal, nsAString& aOrigin, ErrorResult& aRv)
-{
-  MOZ_ASSERT(aPrincipal);
-
-  uint16_t appStatus = aPrincipal->GetAppStatus();
-
-  if (appStatus == nsIPrincipal::APP_STATUS_NOT_INSTALLED) {
-    nsAutoString tmp;
-    aRv = nsContentUtils::GetUTFOrigin(aPrincipal, tmp);
-    if (NS_WARN_IF(aRv.Failed())) {
-      return;
-    }
-
-    aOrigin = tmp;
-    return;
-  }
-
-  uint32_t appId = aPrincipal->GetAppId();
-
-  // If we are in "app code", use manifest URL as unique origin since
-  // multiple apps can share the same origin but not same broadcast messages.
-  nsresult rv;
-  nsCOMPtr<nsIAppsService> appsService =
-    do_GetService("@mozilla.org/AppsService;1", &rv);
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    aRv.Throw(rv);
-    return;
-  }
-
-  appsService->GetManifestURLByLocalId(appId, aOrigin);
-}
-
-nsIPrincipal*
-GetPrincipalFromWorkerPrivate(WorkerPrivate* aWorkerPrivate)
-{
-  nsIPrincipal* principal = aWorkerPrivate->GetPrincipal();
-  if (principal) {
-    return principal;
-  }
-
-  // Walk up to our containing page
-  WorkerPrivate* wp = aWorkerPrivate;
-  while (wp->GetParent()) {
-    wp = wp->GetParent();
-  }
-
-  return wp->GetPrincipal();
-}
-
-class InitializeRunnable MOZ_FINAL : public WorkerMainThreadRunnable
-{
-public:
-  InitializeRunnable(WorkerPrivate* aWorkerPrivate, nsAString& aOrigin,
-                     PrincipalInfo& aPrincipalInfo, ErrorResult& aRv)
-    : WorkerMainThreadRunnable(aWorkerPrivate)
-    , mWorkerPrivate(GetCurrentThreadWorkerPrivate())
-    , mOrigin(aOrigin)
-    , mPrincipalInfo(aPrincipalInfo)
-    , mRv(aRv)
-  {
-    MOZ_ASSERT(mWorkerPrivate);
-  }
-
-  bool MainThreadRun() MOZ_OVERRIDE
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    nsIPrincipal* principal = GetPrincipalFromWorkerPrivate(mWorkerPrivate);
-    if (!principal) {
-      mRv.Throw(NS_ERROR_FAILURE);
-      return true;
-    }
-
-    bool isNullPrincipal;
-    mRv = principal->GetIsNullPrincipal(&isNullPrincipal);
-    if (NS_WARN_IF(mRv.Failed())) {
-      return true;
-    }
-
-    if (NS_WARN_IF(isNullPrincipal)) {
-      mRv.Throw(NS_ERROR_FAILURE);
-      return true;
-    }
-
-    mRv = PrincipalToPrincipalInfo(principal, &mPrincipalInfo);
-    if (NS_WARN_IF(mRv.Failed())) {
-      return true;
-    }
-
-    GetOrigin(principal, mOrigin, mRv);
-    if (NS_WARN_IF(mRv.Failed())) {
-      return true;
-    }
-
-    // Walk up to our containing page
-    WorkerPrivate* wp = mWorkerPrivate;
-    while (wp->GetParent()) {
-      wp = wp->GetParent();
-    }
-
-    // Window doesn't exist for some kind of workers (eg: SharedWorkers)
-    nsPIDOMWindow* window = wp->GetWindow();
-    if (!window) {
-      return true;
-    }
-
-    nsIDocument* doc = window->GetExtantDoc();
-    // No bfcache when BroadcastChannel is used.
-    if (doc) {
-      doc->DisallowBFCaching();
-    }
-
-    return true;
-  }
-
-private:
-  WorkerPrivate* mWorkerPrivate;
-  nsAString& mOrigin;
-  PrincipalInfo& mPrincipalInfo;
-  ErrorResult& mRv;
-};
-
-class PostMessageRunnable MOZ_FINAL : public nsICancelableRunnable
-{
-public:
-  NS_DECL_ISUPPORTS
-
-  PostMessageRunnable(BroadcastChannelChild* aActor,
-                      BroadcastChannelMessage* aData)
-    : mActor(aActor)
-    , mData(aData)
-  {
-    MOZ_ASSERT(mActor);
-  }
-
-  NS_IMETHODIMP Run()
-  {
-    MOZ_ASSERT(mActor);
-    if (mActor->IsActorDestroyed()) {
-      return NS_OK;
-    }
-
-    ClonedMessageData message;
-
-    SerializedStructuredCloneBuffer& buffer = message.data();
-    buffer.data = mData->mBuffer.data();
-    buffer.dataLength = mData->mBuffer.nbytes();
-
-    PBackgroundChild* backgroundManager = mActor->Manager();
-    MOZ_ASSERT(backgroundManager);
-
-    const nsTArray<nsRefPtr<File>>& blobs = mData->mClosure.mBlobs;
-
-    if (!blobs.IsEmpty()) {
-      message.blobsChild().SetCapacity(blobs.Length());
-
-      for (uint32_t i = 0, len = blobs.Length(); i < len; ++i) {
-        PBlobChild* blobChild =
-          BackgroundChild::GetOrCreateActorForBlob(backgroundManager, blobs[i]);
-        MOZ_ASSERT(blobChild);
-
-        message.blobsChild().AppendElement(blobChild);
-      }
-    }
-
-    mActor->SendPostMessage(message);
-    return NS_OK;
-  }
-
-  NS_IMETHODIMP Cancel()
-  {
-    mActor = nullptr;
-    return NS_OK;
-  }
-
-private:
-  ~PostMessageRunnable() {}
-
-  nsRefPtr<BroadcastChannelChild> mActor;
-  nsRefPtr<BroadcastChannelMessage> mData;
-};
-
-NS_IMPL_ISUPPORTS(PostMessageRunnable, nsICancelableRunnable, nsIRunnable)
-
-class CloseRunnable MOZ_FINAL : public nsICancelableRunnable
-{
-public:
-  NS_DECL_ISUPPORTS
-
-  explicit CloseRunnable(BroadcastChannel* aBC)
-    : mBC(aBC)
-  {
-    MOZ_ASSERT(mBC);
-  }
-
-  NS_IMETHODIMP Run()
-  {
-    mBC->Shutdown();
-    return NS_OK;
-  }
-
-  NS_IMETHODIMP Cancel()
-  {
-    mBC = nullptr;
-    return NS_OK;
-  }
-
-private:
-  ~CloseRunnable() {}
-
-  nsRefPtr<BroadcastChannel> mBC;
-};
-
-NS_IMPL_ISUPPORTS(CloseRunnable, nsICancelableRunnable, nsIRunnable)
-
-class TeardownRunnable MOZ_FINAL : public nsICancelableRunnable
-{
-public:
-  NS_DECL_ISUPPORTS
-
-  explicit TeardownRunnable(BroadcastChannelChild* aActor)
-    : mActor(aActor)
-  {
-    MOZ_ASSERT(mActor);
-  }
-
-  NS_IMETHODIMP Run()
-  {
-    MOZ_ASSERT(mActor);
-    if (!mActor->IsActorDestroyed()) {
-      mActor->SendClose();
-    }
-    return NS_OK;
-  }
-
-  NS_IMETHODIMP Cancel()
-  {
-    mActor = nullptr;
-    return NS_OK;
-  }
-
-private:
-  ~TeardownRunnable() {}
-
-  nsRefPtr<BroadcastChannelChild> mActor;
-};
-
-NS_IMPL_ISUPPORTS(TeardownRunnable, nsICancelableRunnable, nsIRunnable)
-
-class BroadcastChannelFeature : public workers::WorkerFeature
-{
-  BroadcastChannel* mChannel;
-
-public:
-  explicit BroadcastChannelFeature(BroadcastChannel* aChannel)
-    : mChannel(aChannel)
-  {
-    MOZ_ASSERT(aChannel);
-  }
-
-  virtual bool Notify(JSContext* aCx, workers::Status aStatus) MOZ_OVERRIDE
-  {
-    if (aStatus >= Canceling) {
-      mChannel->Shutdown();
-    }
-
-    return true;
-  }
-};
-
-bool
-CheckPermission(nsIPrincipal* aPrincipal)
-{
-  // First of all, the general pref has to be turned on.
-  bool enabled = false;
-  Preferences::GetBool("dom.broadcastChannel.enabled", &enabled);
-  if (!enabled) {
-    return false;
-  }
-
-  if (!aPrincipal) {
-    return false;
-  }
-
-  uint16_t status;
-  if (NS_FAILED(aPrincipal->GetAppStatus(&status))) {
-    return false;
-  }
-
-  // Only support BroadcastChannel API for certified apps and desktop builds.
-  return status == nsIPrincipal::APP_STATUS_CERTIFIED ||
-         status == nsIPrincipal::APP_STATUS_NOT_INSTALLED;
-}
-
-// A WorkerMainThreadRunnable to synchronously dispatch the call of
-// CheckPermission() from the worker thread to the main thread.
-class CheckPermissionRunnable MOZ_FINAL
-  : public workers::WorkerMainThreadRunnable
-{
-public:
-  bool mResult;
-
-  explicit CheckPermissionRunnable(workers::WorkerPrivate* aWorkerPrivate)
-    : workers::WorkerMainThreadRunnable(aWorkerPrivate)
-    , mResult(false)
-  {
-    MOZ_ASSERT(aWorkerPrivate);
-    aWorkerPrivate->AssertIsOnWorkerThread();
-  }
-
-protected:
-  virtual bool
-  MainThreadRun() MOZ_OVERRIDE
-  {
-    workers::AssertIsOnMainThread();
-
-    nsIPrincipal* principal = GetPrincipalFromWorkerPrivate(mWorkerPrivate);
-    if (!principal) {
-      return true;
-    }
-
-    mResult = CheckPermission(principal);
-    return true;
-  }
-};
-
-} // anonymous namespace
-
-/* static */ bool
-BroadcastChannel::IsEnabled(JSContext* aCx, JSObject* aGlobal)
-{
-  if (NS_IsMainThread()) {
-    JS::Rooted<JSObject*> global(aCx, aGlobal);
-
-    nsCOMPtr<nsPIDOMWindow> win = Navigator::GetWindowFromGlobal(global);
-    if (!win) {
-      return false;
-    }
-
-    nsIDocument* doc = win->GetExtantDoc();
-    if (!doc) {
-      return false;
-    }
-
-    return CheckPermission(doc->NodePrincipal());
-  }
-
-  workers::WorkerPrivate* workerPrivate =
-    workers::GetWorkerPrivateFromContext(aCx);
-  workerPrivate->AssertIsOnWorkerThread();
-
-  nsRefPtr<CheckPermissionRunnable> runnable =
-    new CheckPermissionRunnable(workerPrivate);
-
-  if (!runnable->Dispatch(aCx)) {
-    JS_ClearPendingException(aCx);
-    return false;
-  }
-
-  return runnable->mResult;
-}
-
-BroadcastChannel::BroadcastChannel(nsPIDOMWindow* aWindow,
-                                   const PrincipalInfo& aPrincipalInfo,
-                                   const nsAString& aOrigin,
-                                   const nsAString& aChannel)
-  : DOMEventTargetHelper(aWindow)
-  , mWorkerFeature(nullptr)
-  , mPrincipalInfo(new PrincipalInfo(aPrincipalInfo))
-  , mOrigin(aOrigin)
-  , mChannel(aChannel)
-  , mIsKeptAlive(false)
-  , mInnerID(0)
-  , mState(StateActive)
-{
-  // Window can be null in workers
-}
-
-BroadcastChannel::~BroadcastChannel()
-{
-  Shutdown();
-  MOZ_ASSERT(!mWorkerFeature);
-}
-
-JSObject*
-BroadcastChannel::WrapObject(JSContext* aCx)
-{
-  return BroadcastChannelBinding::Wrap(aCx, this);
-}
-
-/* static */ already_AddRefed<BroadcastChannel>
-BroadcastChannel::Constructor(const GlobalObject& aGlobal,
-                              const nsAString& aChannel,
-                              ErrorResult& aRv)
-{
-  nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
-  // Window is null in workers.
-
-  nsAutoString origin;
-  PrincipalInfo principalInfo;
-  WorkerPrivate* workerPrivate = nullptr;
-
-  if (NS_IsMainThread()) {
-    nsCOMPtr<nsIGlobalObject> incumbent = mozilla::dom::GetIncumbentGlobal();
-
-    if (!incumbent) {
-      aRv.Throw(NS_ERROR_FAILURE);
-      return nullptr;
-    }
-
-    nsIPrincipal* principal = incumbent->PrincipalOrNull();
-    if (!principal) {
-      aRv.Throw(NS_ERROR_UNEXPECTED);
-      return nullptr;
-    }
-
-    bool isNullPrincipal;
-    aRv = principal->GetIsNullPrincipal(&isNullPrincipal);
-    if (NS_WARN_IF(aRv.Failed())) {
-      return nullptr;
-    }
-
-    if (NS_WARN_IF(isNullPrincipal)) {
-      aRv.Throw(NS_ERROR_FAILURE);
-      return nullptr;
-    }
-
-    GetOrigin(principal, origin, aRv);
-
-    aRv = PrincipalToPrincipalInfo(principal, &principalInfo);
-    if (NS_WARN_IF(aRv.Failed())) {
-      return nullptr;
-    }
-
-    nsIDocument* doc = window->GetExtantDoc();
-    // No bfcache when BroadcastChannel is used.
-    if (doc) {
-      doc->DisallowBFCaching();
-    }
-  } else {
-    JSContext* cx = aGlobal.Context();
-    workerPrivate = GetWorkerPrivateFromContext(cx);
-    MOZ_ASSERT(workerPrivate);
-
-    nsRefPtr<InitializeRunnable> runnable =
-      new InitializeRunnable(workerPrivate, origin, principalInfo, aRv);
-    runnable->Dispatch(cx);
-  }
-
-  if (aRv.Failed()) {
-    return nullptr;
-  }
-
-  nsRefPtr<BroadcastChannel> bc =
-    new BroadcastChannel(window, principalInfo, origin, aChannel);
-
-  // Register this component to PBackground.
-  PBackgroundChild* actor = BackgroundChild::GetForCurrentThread();
-  if (actor) {
-    bc->ActorCreated(actor);
-  } else {
-    BackgroundChild::GetOrCreateForCurrentThread(bc);
-  }
-
-  if (!workerPrivate) {
-    MOZ_ASSERT(window);
-    MOZ_ASSERT(window->IsInnerWindow());
-    bc->mInnerID = window->WindowID();
-
-    // Register as observer for inner-window-destroyed.
-    nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-    if (obs) {
-      obs->AddObserver(bc, "inner-window-destroyed", false);
-    }
-  } else {
-    bc->mWorkerFeature = new BroadcastChannelFeature(bc);
-    JSContext* cx = workerPrivate->GetJSContext();
-    if (NS_WARN_IF(!workerPrivate->AddFeature(cx, bc->mWorkerFeature))) {
-      NS_WARNING("Failed to register the BroadcastChannel worker feature.");
-      return nullptr;
-    }
-  }
-
-  return bc.forget();
-}
-
-void
-BroadcastChannel::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                              ErrorResult& aRv)
-{
-  if (mState != StateActive) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return;
-  }
-
-  PostMessageInternal(aCx, aMessage, aRv);
-}
-
-void
-BroadcastChannel::PostMessageInternal(JSContext* aCx,
-                                      JS::Handle<JS::Value> aMessage,
-                                      ErrorResult& aRv)
-{
-  nsRefPtr<BroadcastChannelMessage> data = new BroadcastChannelMessage();
-
-  if (!WriteStructuredClone(aCx, aMessage, data->mBuffer, data->mClosure)) {
-    aRv.Throw(NS_ERROR_DOM_DATA_CLONE_ERR);
-    return;
-  }
-
-  const nsTArray<nsRefPtr<File>>& blobs = data->mClosure.mBlobs;
-  for (uint32_t i = 0, len = blobs.Length(); i < len; ++i) {
-    if (!blobs[i]->Impl()->MayBeClonedToOtherThreads()) {
-      aRv.Throw(NS_ERROR_DOM_DATA_CLONE_ERR);
-      return;
-    }
-  }
-
-  PostMessageData(data);
-}
-
-void
-BroadcastChannel::PostMessageData(BroadcastChannelMessage* aData)
-{
-  if (mActor) {
-    nsRefPtr<PostMessageRunnable> runnable =
-      new PostMessageRunnable(mActor, aData);
-
-    if (NS_FAILED(NS_DispatchToCurrentThread(runnable))) {
-      NS_WARNING("Failed to dispatch to the current thread!");
-    }
-
-    return;
-  }
-
-  mPendingMessages.AppendElement(aData);
-}
-
-void
-BroadcastChannel::Close()
-{
-  if (mState != StateActive) {
-    return;
-  }
-
-  if (mPendingMessages.IsEmpty()) {
-    // We cannot call Shutdown() immediatelly because we could have some
-    // postMessage runnable already dispatched. Instead, we change the state to
-    // StateClosed and we shutdown the actor asynchrounsly.
-
-    mState = StateClosed;
-    nsRefPtr<CloseRunnable> runnable = new CloseRunnable(this);
-
-    if (NS_FAILED(NS_DispatchToCurrentThread(runnable))) {
-      NS_WARNING("Failed to dispatch to the current thread!");
-    }
-  } else {
-    MOZ_ASSERT(!mActor);
-    mState = StateClosing;
-  }
-}
-
-void
-BroadcastChannel::ActorFailed()
-{
-  MOZ_CRASH("Failed to create a PBackgroundChild actor!");
-}
-
-void
-BroadcastChannel::ActorCreated(PBackgroundChild* aActor)
-{
-  MOZ_ASSERT(aActor);
-
-  if (mState == StateClosed) {
-    return;
-  }
-
-  PBroadcastChannelChild* actor =
-    aActor->SendPBroadcastChannelConstructor(*mPrincipalInfo, mOrigin, mChannel);
-
-  mActor = static_cast<BroadcastChannelChild*>(actor);
-  MOZ_ASSERT(mActor);
-
-  mActor->SetParent(this);
-
-  // Flush pending messages.
-  for (uint32_t i = 0; i < mPendingMessages.Length(); ++i) {
-    PostMessageData(mPendingMessages[i]);
-  }
-
-  mPendingMessages.Clear();
-
-  if (mState == StateClosing) {
-    Shutdown();
-  }
-}
-
-void
-BroadcastChannel::Shutdown()
-{
-  mState = StateClosed;
-
-  // If shutdown() is called we have to release the reference if we still keep
-  // it.
-  if (mIsKeptAlive) {
-    mIsKeptAlive = false;
-    Release();
-  }
-
-  if (mWorkerFeature) {
-    WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
-    workerPrivate->RemoveFeature(workerPrivate->GetJSContext(), mWorkerFeature);
-    mWorkerFeature = nullptr;
-  }
-
-  if (mActor) {
-    mActor->SetParent(nullptr);
-
-    nsRefPtr<TeardownRunnable> runnable = new TeardownRunnable(mActor);
-    NS_DispatchToCurrentThread(runnable);
-
-    mActor = nullptr;
-  }
-}
-
-EventHandlerNonNull*
-BroadcastChannel::GetOnmessage()
-{
-  if (NS_IsMainThread()) {
-    return GetEventHandler(nsGkAtoms::onmessage, EmptyString());
-  }
-  return GetEventHandler(nullptr, NS_LITERAL_STRING("message"));
-}
-
-void
-BroadcastChannel::SetOnmessage(EventHandlerNonNull* aCallback)
-{
-  if (NS_IsMainThread()) {
-    SetEventHandler(nsGkAtoms::onmessage, EmptyString(), aCallback);
-  } else {
-    SetEventHandler(nullptr, NS_LITERAL_STRING("message"), aCallback);
-  }
-
-  UpdateMustKeepAlive();
-}
-
-void
-BroadcastChannel::AddEventListener(const nsAString& aType,
-                                   EventListener* aCallback,
-                                   bool aCapture,
-                                   const dom::Nullable<bool>& aWantsUntrusted,
-                                   ErrorResult& aRv)
-{
-  DOMEventTargetHelper::AddEventListener(aType, aCallback, aCapture,
-                                         aWantsUntrusted, aRv);
-
-  if (aRv.Failed()) {
-    return;
-  }
-
-  UpdateMustKeepAlive();
-}
-
-void
-BroadcastChannel::RemoveEventListener(const nsAString& aType,
-                                      EventListener* aCallback,
-                                      bool aCapture,
-                                      ErrorResult& aRv)
-{
-  DOMEventTargetHelper::RemoveEventListener(aType, aCallback, aCapture, aRv);
-
-  if (aRv.Failed()) {
-    return;
-  }
-
-  UpdateMustKeepAlive();
-}
-
-void
-BroadcastChannel::UpdateMustKeepAlive()
-{
-  bool toKeepAlive = HasListenersFor(NS_LITERAL_STRING("message"));
-  if (toKeepAlive == mIsKeptAlive) {
-    return;
-  }
-
-  mIsKeptAlive = toKeepAlive;
-
-  if (toKeepAlive) {
-    AddRef();
-  } else {
-    Release();
-  }
-}
-
-NS_IMETHODIMP
-BroadcastChannel::Observe(nsISupports* aSubject, const char* aTopic,
-                          const char16_t* aData)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!strcmp(aTopic, "inner-window-destroyed"));
-
-  // If the window is destroyed we have to release the reference that we are
-  // keeping.
-  if (!mIsKeptAlive) {
-    return NS_OK;
-  }
-
-  nsCOMPtr<nsISupportsPRUint64> wrapper = do_QueryInterface(aSubject);
-  NS_ENSURE_TRUE(wrapper, NS_ERROR_FAILURE);
-
-  uint64_t innerID;
-  nsresult rv = wrapper->GetData(&innerID);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (innerID == mInnerID) {
-    nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-    if (obs) {
-      obs->RemoveObserver(this, "inner-window-destroyed");
-    }
-
-    Shutdown();
-  }
-
-  return NS_OK;
-}
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(BroadcastChannel)
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BroadcastChannel,
-                                                  DOMEventTargetHelper)
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BroadcastChannel,
-                                                DOMEventTargetHelper)
-  tmp->Shutdown();
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BroadcastChannel)
-  NS_INTERFACE_MAP_ENTRY(nsIIPCBackgroundChildCreateCallback)
-  NS_INTERFACE_MAP_ENTRY(nsIObserver)
-NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
-
-NS_IMPL_ADDREF_INHERITED(BroadcastChannel, DOMEventTargetHelper)
-NS_IMPL_RELEASE_INHERITED(BroadcastChannel, DOMEventTargetHelper)
-
-} // dom namespace
-} // mozilla namespace
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannel.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_BroadcastChannel_h
-#define mozilla_dom_BroadcastChannel_h
-
-#include "mozilla/Attributes.h"
-#include "mozilla/DOMEventTargetHelper.h"
-#include "nsIIPCBackgroundChildCreateCallback.h"
-#include "nsIObserver.h"
-#include "nsTArray.h"
-#include "nsRefPtr.h"
-
-class nsPIDOMWindow;
-
-namespace mozilla {
-
-namespace ipc {
-class PrincipalInfo;
-}
-
-namespace dom {
-
-namespace workers {
-class WorkerFeature;
-}
-
-class BroadcastChannelChild;
-class BroadcastChannelMessage;
-
-class BroadcastChannel MOZ_FINAL
-  : public DOMEventTargetHelper
-  , public nsIIPCBackgroundChildCreateCallback
-  , public nsIObserver
-{
-  NS_DECL_NSIIPCBACKGROUNDCHILDCREATECALLBACK
-  NS_DECL_NSIOBSERVER
-
-  typedef mozilla::ipc::PrincipalInfo PrincipalInfo;
-
-public:
-  NS_DECL_ISUPPORTS_INHERITED
-
-  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BroadcastChannel,
-                                           DOMEventTargetHelper)
-
-  static bool IsEnabled(JSContext* aCx, JSObject* aGlobal);
-
-  virtual JSObject*
-  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
-
-  static already_AddRefed<BroadcastChannel>
-  Constructor(const GlobalObject& aGlobal, const nsAString& aChannel,
-              ErrorResult& aRv);
-
-  void GetName(nsAString& aName) const
-  {
-    aName = mChannel;
-  }
-
-  void PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                   ErrorResult& aRv);
-
-  void Close();
-
-  EventHandlerNonNull* GetOnmessage();
-  void SetOnmessage(EventHandlerNonNull* aCallback);
-
-  using nsIDOMEventTarget::AddEventListener;
-  using nsIDOMEventTarget::RemoveEventListener;
-
-  virtual void AddEventListener(const nsAString& aType,
-                                EventListener* aCallback,
-                                bool aCapture,
-                                const Nullable<bool>& aWantsUntrusted,
-                                ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void RemoveEventListener(const nsAString& aType,
-                                   EventListener* aCallback,
-                                   bool aCapture,
-                                   ErrorResult& aRv) MOZ_OVERRIDE;
-
-  void Shutdown();
-
-  bool IsClosed() const
-  {
-    return mState != StateActive;
-  }
-
-private:
-  BroadcastChannel(nsPIDOMWindow* aWindow,
-                   const PrincipalInfo& aPrincipalInfo,
-                   const nsAString& aOrigin,
-                   const nsAString& aChannel);
-
-  ~BroadcastChannel();
-
-  void PostMessageData(BroadcastChannelMessage* aData);
-
-  void PostMessageInternal(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                           ErrorResult& aRv);
-
-  void UpdateMustKeepAlive();
-
-  nsRefPtr<BroadcastChannelChild> mActor;
-  nsTArray<nsRefPtr<BroadcastChannelMessage>> mPendingMessages;
-
-  workers::WorkerFeature* mWorkerFeature;
-
-  nsAutoPtr<PrincipalInfo> mPrincipalInfo;
-
-  nsString mOrigin;
-  nsString mChannel;
-
-  bool mIsKeptAlive;
-
-  uint64_t mInnerID;
-
-  enum {
-    StateActive,
-    StateClosing,
-    StateClosed
-  } mState;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_BroadcastChannel_h
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelChild.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BroadcastChannelChild.h"
-#include "BroadcastChannel.h"
-#include "jsapi.h"
-#include "mozilla/dom/ipc/BlobChild.h"
-#include "mozilla/dom/File.h"
-#include "mozilla/dom/MessageEvent.h"
-#include "mozilla/dom/MessageEventBinding.h"
-#include "mozilla/dom/StructuredCloneUtils.h"
-#include "mozilla/dom/WorkerPrivate.h"
-#include "mozilla/dom/WorkerScope.h"
-#include "mozilla/dom/ScriptSettings.h"
-#include "mozilla/ipc/PBackgroundChild.h"
-#include "WorkerPrivate.h"
-
-namespace mozilla {
-
-using namespace ipc;
-
-namespace dom {
-
-using namespace workers;
-
-BroadcastChannelChild::BroadcastChannelChild(const nsAString& aOrigin,
-                                             const nsAString& aChannel)
-  : mOrigin(aOrigin)
-  , mChannel(aChannel)
-  , mActorDestroyed(false)
-{
-}
-
-BroadcastChannelChild::~BroadcastChannelChild()
-{
-  MOZ_ASSERT(!mBC);
-}
-
-bool
-BroadcastChannelChild::RecvNotify(const ClonedMessageData& aData)
-{
-  // Make sure to retrieve all blobs from the message before returning to avoid
-  // leaking their actors.
-  nsTArray<nsRefPtr<File>> files;
-  if (!aData.blobsChild().IsEmpty()) {
-    files.SetCapacity(aData.blobsChild().Length());
-
-    for (uint32_t i = 0, len = aData.blobsChild().Length(); i < len; ++i) {
-      nsRefPtr<FileImpl> impl =
-        static_cast<BlobChild*>(aData.blobsChild()[i])->GetBlobImpl();
-
-      nsRefPtr<File> file = new File(mBC ? mBC->GetOwner() : nullptr, impl);
-      files.AppendElement(file);
-    }
-  }
-
-  nsCOMPtr<DOMEventTargetHelper> helper = mBC;
-  nsCOMPtr<EventTarget> eventTarget = do_QueryInterface(helper);
-
-  // This object has been already closed by content or is going to be deleted
-  // soon. No notify is required.
-  if (!eventTarget || mBC->IsClosed()) {
-    return true;
-  }
-
-  // CheckInnerWindowCorrectness can be used also without a window when
-  // BroadcastChannel is running in a worker. In this case, it's a NOP.
-  if (NS_FAILED(mBC->CheckInnerWindowCorrectness())) {
-    return true;
-  }
-
-  AutoJSAPI jsapi;
-  nsCOMPtr<nsIGlobalObject> globalObject;
-
-  if (NS_IsMainThread()) {
-    globalObject = do_QueryInterface(mBC->GetParentObject());
-  } else {
-    WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
-    MOZ_ASSERT(workerPrivate);
-    globalObject = workerPrivate->GlobalScope();
-  }
-
-  if (!globalObject || !jsapi.Init(globalObject)) {
-    NS_WARNING("Failed to initialize AutoJSAPI object.");
-    return true;
-  }
-
-  JSContext* cx = jsapi.cx();
-
-  const SerializedStructuredCloneBuffer& buffer = aData.data();
-  StructuredCloneData cloneData;
-  cloneData.mData = buffer.data;
-  cloneData.mDataLength = buffer.dataLength;
-  cloneData.mClosure.mBlobs.SwapElements(files);
-
-  JS::Rooted<JS::Value> value(cx, JS::NullValue());
-  if (cloneData.mDataLength && !ReadStructuredClone(cx, cloneData, &value)) {
-    JS_ClearPendingException(cx);
-    return false;
-  }
-
-  RootedDictionary<MessageEventInit> init(cx);
-  init.mBubbles = false;
-  init.mCancelable = false;
-  init.mOrigin.Construct(mOrigin);
-  init.mData = value;
-
-  ErrorResult rv;
-  nsRefPtr<MessageEvent> event =
-    MessageEvent::Constructor(mBC, NS_LITERAL_STRING("message"), init, rv);
-  if (rv.Failed()) {
-    NS_WARNING("Failed to create a MessageEvent object.");
-    return true;
-  }
-
-  event->SetTrusted(true);
-
-  bool status;
-  mBC->DispatchEvent(static_cast<Event*>(event.get()), &status);
-
-  return true;
-}
-
-void
-BroadcastChannelChild::ActorDestroy(ActorDestroyReason aWhy)
-{
-  mActorDestroyed = true;
-}
-
-} // dom namespace
-} // mozilla namespace
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelChild.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_BroadcastChannelChild_h
-#define mozilla_dom_BroadcastChannelChild_h
-
-#include "mozilla/dom/PBroadcastChannelChild.h"
-
-namespace mozilla {
-
-namespace ipc {
-class BackgroundChildImpl;
-}
-
-namespace dom {
-
-class BroadcastChannel;
-
-class BroadcastChannelChild MOZ_FINAL : public PBroadcastChannelChild
-{
-  friend class mozilla::ipc::BackgroundChildImpl;
-
-public:
-  NS_INLINE_DECL_REFCOUNTING(BroadcastChannelChild)
-
-  void SetParent(BroadcastChannel* aBC)
-  {
-    mBC = aBC;
-  }
-
-  virtual bool RecvNotify(const ClonedMessageData& aData) MOZ_OVERRIDE;
-
-  bool IsActorDestroyed() const
-  {
-    return mActorDestroyed;
-  }
-
-private:
-  BroadcastChannelChild(const nsAString& aOrigin,
-                        const nsAString& aChannel);
-
-  ~BroadcastChannelChild();
-
-  void ActorDestroy(ActorDestroyReason aWhy);
-
-  // This raw pointer is actually the parent object.
-  // It's set to null when the parent object is deleted.
-  BroadcastChannel* mBC;
-
-  nsString mOrigin;
-  nsString mChannel;
-
-  bool mActorDestroyed;
-};
-
-} // dom namespace
-} // mozilla namespace
-
-#endif // mozilla_dom_BroadcastChannelChild_h
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelParent.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BroadcastChannelParent.h"
-#include "BroadcastChannelService.h"
-#include "mozilla/dom/File.h"
-#include "mozilla/dom/ipc/BlobParent.h"
-#include "mozilla/ipc/BackgroundParent.h"
-#include "mozilla/unused.h"
-
-namespace mozilla {
-
-using namespace ipc;
-
-namespace dom {
-
-BroadcastChannelParent::BroadcastChannelParent(
-                                            const nsAString& aOrigin,
-                                            const nsAString& aChannel)
-  : mService(BroadcastChannelService::GetOrCreate())
-  , mOrigin(aOrigin)
-  , mChannel(aChannel)
-{
-  AssertIsOnBackgroundThread();
-  mService->RegisterActor(this);
-}
-
-BroadcastChannelParent::~BroadcastChannelParent()
-{
-  AssertIsOnBackgroundThread();
-}
-
-bool
-BroadcastChannelParent::RecvPostMessage(const ClonedMessageData& aData)
-{
-  AssertIsOnBackgroundThread();
-
-  if (NS_WARN_IF(!mService)) {
-    return false;
-  }
-
-  mService->PostMessage(this, aData, mOrigin, mChannel);
-  return true;
-}
-
-bool
-BroadcastChannelParent::RecvClose()
-{
-  AssertIsOnBackgroundThread();
-
-  if (NS_WARN_IF(!mService)) {
-    return false;
-  }
-
-  mService->UnregisterActor(this);
-  mService = nullptr;
-
-  unused << Send__delete__(this);
-
-  return true;
-}
-
-void
-BroadcastChannelParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  AssertIsOnBackgroundThread();
-
-  if (mService) {
-    // This object is about to be released and with it, also mService will be
-    // released too.
-    mService->UnregisterActor(this);
-  }
-}
-
-void
-BroadcastChannelParent::CheckAndDeliver(const ClonedMessageData& aData,
-                                        const nsString& aOrigin,
-                                        const nsString& aChannel)
-{
-  AssertIsOnBackgroundThread();
-
-  if (aOrigin == mOrigin && aChannel == mChannel) {
-    // We need to duplicate data only if we have blobs.
-    if (aData.blobsParent().IsEmpty()) {
-      unused << SendNotify(aData);
-      return;
-    }
-
-    // Duplicate the data for this parent.
-    ClonedMessageData newData(aData);
-
-    // Ricreate the BlobParent for this new message.
-    for (uint32_t i = 0, len = newData.blobsParent().Length(); i < len; ++i) {
-      nsRefPtr<FileImpl> impl =
-        static_cast<BlobParent*>(newData.blobsParent()[i])->GetBlobImpl();
-
-      PBlobParent* blobParent =
-        BackgroundParent::GetOrCreateActorForBlobImpl(Manager(), impl);
-      if (!blobParent) {
-        return;
-      }
-
-      newData.blobsParent()[i] = blobParent;
-    }
-
-    unused << SendNotify(newData);
-  }
-}
-
-} // dom namespace
-} // mozilla namespace
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelParent.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_BroadcastChannelParent_h
-#define mozilla_dom_BroadcastChannelParent_h
-
-#include "mozilla/dom/PBroadcastChannelParent.h"
-
-namespace mozilla {
-
-namespace ipc {
-class BackgroundParentImpl;
-}
-
-namespace dom {
-
-class BroadcastChannelService;
-
-class BroadcastChannelParent MOZ_FINAL : public PBroadcastChannelParent
-{
-  friend class mozilla::ipc::BackgroundParentImpl;
-
-public:
-  void CheckAndDeliver(const ClonedMessageData& aData,
-                       const nsString& aOrigin,
-                       const nsString& aChannel);
-
-private:
-  BroadcastChannelParent(const nsAString& aOrigin,
-                         const nsAString& aChannel);
-  ~BroadcastChannelParent();
-
-  virtual bool
-  RecvPostMessage(const ClonedMessageData& aData) MOZ_OVERRIDE;
-
-  virtual bool RecvClose() MOZ_OVERRIDE;
-
-  virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
-
-  nsRefPtr<BroadcastChannelService> mService;
-  nsString mOrigin;
-  nsString mChannel;
-};
-
-} // dom namespace
-} // mozilla namespace
-
-#endif // mozilla_dom_BroadcastChannelParent_h
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelService.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BroadcastChannelService.h"
-#include "BroadcastChannelParent.h"
-#include "mozilla/ipc/BackgroundParent.h"
-
-#ifdef XP_WIN
-#undef PostMessage
-#endif
-
-namespace mozilla {
-
-using namespace ipc;
-
-namespace dom {
-
-namespace {
-
-BroadcastChannelService* sInstance = nullptr;
-
-} // anonymous namespace
-
-BroadcastChannelService::BroadcastChannelService()
-{
-  AssertIsOnBackgroundThread();
-
-  // sInstance is a raw BroadcastChannelService*.
-  MOZ_ASSERT(!sInstance);
-  sInstance = this;
-}
-
-BroadcastChannelService::~BroadcastChannelService()
-{
-  AssertIsOnBackgroundThread();
-  MOZ_ASSERT(sInstance == this);
-  MOZ_ASSERT(mAgents.Count() == 0);
-
-  sInstance = nullptr;
-}
-
-// static
-already_AddRefed<BroadcastChannelService>
-BroadcastChannelService::GetOrCreate()
-{
-  AssertIsOnBackgroundThread();
-
-  nsRefPtr<BroadcastChannelService> instance = sInstance;
-  if (!instance) {
-    instance = new BroadcastChannelService();
-  }
-  return instance.forget();
-}
-
-void
-BroadcastChannelService::RegisterActor(BroadcastChannelParent* aParent)
-{
-  AssertIsOnBackgroundThread();
-  MOZ_ASSERT(aParent);
-  MOZ_ASSERT(!mAgents.Contains(aParent));
-
-  mAgents.PutEntry(aParent);
-}
-
-void
-BroadcastChannelService::UnregisterActor(BroadcastChannelParent* aParent)
-{
-  AssertIsOnBackgroundThread();
-  MOZ_ASSERT(aParent);
-  MOZ_ASSERT(mAgents.Contains(aParent));
-
-  mAgents.RemoveEntry(aParent);
-}
-
-namespace {
-
-struct MOZ_STACK_CLASS PostMessageData MOZ_FINAL
-{
-  PostMessageData(BroadcastChannelParent* aParent,
-                  const ClonedMessageData& aData,
-                  const nsAString& aOrigin,
-                  const nsAString& aChannel)
-    : mParent(aParent)
-    , mData(aData)
-    , mOrigin(aOrigin)
-    , mChannel(aChannel)
-  {
-    MOZ_ASSERT(aParent);
-    MOZ_COUNT_CTOR(PostMessageData);
-  }
-
-  ~PostMessageData()
-  {
-    MOZ_COUNT_DTOR(PostMessageData);
-  }
-
-  BroadcastChannelParent* mParent;
-  const ClonedMessageData& mData;
-  const nsString mOrigin;
-  const nsString mChannel;
-};
-
-PLDHashOperator
-PostMessageEnumerator(nsPtrHashKey<BroadcastChannelParent>* aKey, void* aPtr)
-{
-  AssertIsOnBackgroundThread();
-
-  auto* data = static_cast<PostMessageData*>(aPtr);
-  BroadcastChannelParent* parent = aKey->GetKey();
-  MOZ_ASSERT(parent);
-
-  if (parent != data->mParent) {
-    parent->CheckAndDeliver(data->mData, data->mOrigin, data->mChannel);
-  }
-
-  return PL_DHASH_NEXT;
-}
-
-} // anonymous namespace
-
-void
-BroadcastChannelService::PostMessage(BroadcastChannelParent* aParent,
-                                     const ClonedMessageData& aData,
-                                     const nsAString& aOrigin,
-                                     const nsAString& aChannel)
-{
-  AssertIsOnBackgroundThread();
-  MOZ_ASSERT(aParent);
-  MOZ_ASSERT(mAgents.Contains(aParent));
-
-  PostMessageData data(aParent, aData, aOrigin, aChannel);
-  mAgents.EnumerateEntries(PostMessageEnumerator, &data);
-}
-
-} // dom namespace
-} // mozilla namespace
deleted file mode 100644
--- a/dom/broadcastchannel/BroadcastChannelService.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_BroadcastChannelService_h
-#define mozilla_dom_BroadcastChannelService_h
-
-#include "nsISupportsImpl.h"
-#include "nsHashKeys.h"
-#include "nsTHashtable.h"
-
-#ifdef XP_WIN
-#undef PostMessage
-#endif
-
-namespace mozilla {
-namespace dom {
-
-class BroadcastChannelParent;
-class ClonedMessageData;
-
-class BroadcastChannelService MOZ_FINAL
-{
-public:
-  NS_INLINE_DECL_REFCOUNTING(BroadcastChannelService)
-
-  static already_AddRefed<BroadcastChannelService> GetOrCreate();
-
-  void RegisterActor(BroadcastChannelParent* aParent);
-  void UnregisterActor(BroadcastChannelParent* aParent);
-
-  void PostMessage(BroadcastChannelParent* aParent,
-                   const ClonedMessageData& aData,
-                   const nsAString& aOrigin,
-                   const nsAString& aChannel);
-
-private:
-  BroadcastChannelService();
-  ~BroadcastChannelService();
-
-  nsTHashtable<nsPtrHashKey<BroadcastChannelParent>> mAgents;
-};
-
-} // dom namespace
-} // mozilla namespace
-
-#endif // mozilla_dom_BroadcastChannelService_h
deleted file mode 100644
--- a/dom/broadcastchannel/PBroadcastChannel.ipdl
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-include protocol PBackground;
-include protocol PBlob;
-include DOMTypes;
-
-using struct mozilla::SerializedStructuredCloneBuffer from "ipc/IPCMessageUtils.h";
-
-namespace mozilla {
-namespace dom {
-
-// This protocol is used for the BroadcastChannel API
-protocol PBroadcastChannel
-{
-  manager PBackground;
-
-parent:
-  PostMessage(ClonedMessageData message);
-  Close();
-
-child:
-  Notify(ClonedMessageData message);
-  __delete__();
-};
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/broadcastchannel/moz.build
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-EXPORTS.mozilla.dom += [
-    'BroadcastChannel.h',
-]
-
-SOURCES += [
-    'BroadcastChannel.cpp',
-    'BroadcastChannelChild.cpp',
-    'BroadcastChannelParent.cpp',
-    'BroadcastChannelService.cpp',
-]
-
-IPDL_SOURCES += [
-    'PBroadcastChannel.ipdl',
-]
-
-LOCAL_INCLUDES += [
-    '../workers',
-]
-
-MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
-FAIL_ON_WARNINGS = True
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_pref_worker.js
+++ /dev/null
@@ -1,11 +0,0 @@
-onmessage = function() {
-  var exists = true;
-  try {
-    var bc = new BroadcastChannel('foobar');
-  } catch(e) {
-    exists = false;
-  }
-
-  postMessage({ exists: exists });
-}
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_sharedWorker.js
+++ /dev/null
@@ -1,12 +0,0 @@
-onconnect = function(evt) {
-  evt.ports[0].onmessage = function(evt) {
-    var bc = new BroadcastChannel('foobar');
-    bc.addEventListener('message', function(event) {
-      evt.target.postMessage(event.data == "hello world from the window" ? "OK" : "KO");
-      bc.postMessage("hello world from the worker");
-      bc.close();
-    }, false);
-
-    evt.target.postMessage("READY");
-  }
-}
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_worker.js
+++ /dev/null
@@ -1,18 +0,0 @@
-onmessage = function(evt) {
-  if (evt.data != 0) {
-    var worker = new Worker("broadcastchannel_worker.js");
-    worker.onmessage = function(evt) {
-      postMessage(evt.data);
-    }
-    worker.postMessage(evt.data - 1);
-    return;
-  }
-
-  var bc = new BroadcastChannel('foobar');
-  bc.addEventListener('message', function(event) {
-    bc.postMessage(event.data == "hello world from the window" ? "hello world from the worker" : "KO");
-    bc.close();
-  }, false);
-
-  postMessage("READY");
-}
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_worker_alive.js
+++ /dev/null
@@ -1,8 +0,0 @@
-(new BroadcastChannel('foobar')).postMessage('READY');
-
-(new BroadcastChannel('foobar')).addEventListener('message', function(event) {
-  if (event.data != 'READY') {
-    event.target.postMessage(event.data);
-  }
-}, false);
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_worker_any.js
+++ /dev/null
@@ -1,5 +0,0 @@
-(new BroadcastChannel('foobar')).onmessage = function(event) {
-  event.target.postMessage(event.data);
-}
-
-postMessage("READY");
deleted file mode 100644
--- a/dom/broadcastchannel/tests/iframe_broadcastchannel.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-  <script type="application/javascript">
-
-function is(a, b, msg) {
-  ok(a == b, msg);
-}
-
-function ok(a, msg) {
-  window.parent.postMessage({ status: a ? "OK" : "KO", message: msg }, "*");
-}
-
-ok("BroadcastChannel" in window, "BroadcastChannel exists");
-
-var bc = new BroadcastChannel("foobar");
-ok(bc, "BroadcastChannel can be created");
-is(bc.name, 'foobar', "BroadcastChannel.name is foobar");
-
-ok("postMessage" in bc, "BroadcastChannel has postMessage() method");
-
-bc.onmessage = function(evt) {
-  ok(evt instanceof MessageEvent, 'evt is a MessageEvent');
-  is(evt.target, bc, 'MessageEvent.target is bc');
-  is(evt.target.name, 'foobar', 'MessageEvent.target.name is foobar');
-  is(evt.target.name, bc.name, 'MessageEvent.target.name is bc.name');
-  is(evt.data, "Hello world from the window!", "Message received from the window");
-  bc.postMessage("Hello world from the iframe!");
-}
-
-  </script>
-</body>
-</html>
-
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/mochitest.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[DEFAULT]
-support-files =
-  iframe_broadcastchannel.html
-  broadcastchannel_pref_worker.js
-  broadcastchannel_sharedWorker.js
-  broadcastchannel_worker.js
-  broadcastchannel_worker_alive.js
-  broadcastchannel_worker_any.js
-
-[test_broadcastchannel_any.html]
-[test_broadcastchannel_basic.html]
-[test_broadcastchannel_close.html]
-[test_broadcastchannel_self.html]
-[test_broadcastchannel_pref.html]
-[test_broadcastchannel_sharedWorker.html]
-[test_broadcastchannel_worker.html]
-[test_broadcastchannel_worker_alive.html]
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_any.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for BroadcastChannel</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<div id="content"></div>
-
-<script type="application/javascript">
-
-var tests = [
- 'hello world',
- 123,
- null,
- true,
- new Date(),
- [ 1, 'test', true, new Date() ],
- { a: true, b:  null, c: new Date(), d: [ true, false, {} ] },
- new Blob([123], { type: 'plain/text' })
-];
-
-var currentTest = null;
-
-function getType(a) {
-  if (a === null || a === undefined)
-    return 'null';
-
-  if (Array.isArray(a))
-    return 'array';
-
-  if (typeof a == 'object')
-    return 'object';
-
-  return 'primitive';
-}
-
-function compare(a, b) {
-  is (getType(a), getType(b), 'Type matches');
-
-  var type = getType(a);
-  if (type == 'array') {
-    is (a.length, b.length, 'Array.length matches');
-    for (var i = 0; i < a.length; ++i) {
-      compare(a[i], b[i]);
-    }
-
-    return;
-  }
-
-  if (type == 'object') {
-    ok (a !== b, 'They should not match');
-
-    var aProps = [];
-    for (var p in a) aProps.push(p);
-
-    var bProps = [];
-    for (var p in b) bProps.push(p);
-
-    is (aProps.length, bProps.length, 'Props match');
-    is (aProps.sort().toSource(), bProps.sort().toSource(), 'Props match - using toSource()');
-
-    for (var p in a) {
-      compare(a[p], b[p]);
-    }
-
-    return;
-  }
-
-  if (type != 'null') {
-    is (a.toSource(), b.toSource(), 'Matching using toSource()');
-  }
-}
-
-function runTest() {
-  var bc = new BroadcastChannel("foobar");
-  ok(bc, "BroadcastChannel can be created");
-
-  bc.onmessage = function(event) {
-    compare(event.data, currentTest);
-    next();
-  }
-
-  function next() {
-    if (!tests.length) {
-      SimpleTest.finish();
-      return;
-    }
-
-    currentTest = tests.shift();
-    bc.postMessage(currentTest);
-  }
-
-  var worker = new Worker("broadcastchannel_worker_any.js");
-  worker.onmessage = function(event) {
-    if (event.data == "READY") {
-      next();
-    }
-  };
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTest);
-
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_basic.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for BroadcastChannel</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<div id="content"></div>
-
-<script type="application/javascript">
-
-function runTest() {
-  addEventListener('message', receiveMessage, false);
-  function receiveMessage(evt) {
-    if (evt.data.status == 'OK') {
-      ok(true, evt.data.message);
-    } else if (evt.data.status == 'KO') {
-      ok(false, evt.data.message);
-    } else {
-      ok(false, "Unknown message");
-    }
-  }
-
-  ok("BroadcastChannel" in window, "BroadcastChannel exists");
-
-  var bc = new BroadcastChannel("foobar");
-  ok(bc, "BroadcastChannel can be created");
-  is(bc.name, 'foobar', "BroadcastChannel.name is foobar");
-
-  ok("postMessage" in bc, "BroadcastChannel has postMessage() method");
-
-  bc.onmessage = function(evt) {
-    ok(evt instanceof MessageEvent, "This is a MessageEvent");
-    is(evt.target, bc, "MessageEvent.target is bc");
-    is(evt.target.name, 'foobar', "MessageEvent.target.name is foobar");
-    is(evt.target.name, bc.name, "MessageEvent.target.name == bc.name");
-    is(evt.origin, 'http://mochi.test:8888', "MessageEvent.origin is correct");
-    is(evt.data, "Hello world from the iframe!", "The message from the iframe has been received!");
-    SimpleTest.finish();
-  }
-
-  var div = document.getElementById("content");
-  ok(div, "Parent exists");
-
-  var ifr = document.createElement("iframe");
-  ifr.addEventListener("load", iframeLoaded, false);
-  ifr.setAttribute('src', "iframe_broadcastchannel.html");
-  div.appendChild(ifr);
-
-  function iframeLoaded() {
-    bc.postMessage("Hello world from the window!");
-  }
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTest);
-
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_close.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for BroadcastChannel</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<div id="content"></div>
-
-<script type="application/javascript">
-
-function runTest() {
-  var receiver = new BroadcastChannel('foo');
-  var sequence = [ '2', 'done' ];
-  receiver.onmessage = function(e) {
-    if (!sequence.length) {
-      ok (false, 'No more data is expected');
-      return;
-    }
-
-    var data = sequence.shift();
-    is(e.data, data);
-
-    if (!sequence.length) {
-      SimpleTest.executeSoon(function() {
-        SimpleTest.finish();
-      });
-    }
-  }
-
-  var x = new BroadcastChannel('foo');
-  x.close();
-  try {
-    x.postMessage('1');
-    ok(false, "PostMessage should throw if called after a close().");
-  } catch(e) {
-    ok(true, "PostMessage should throw if called after a close().");
-  }
-
-  var y = new BroadcastChannel('foo');
-  y.postMessage('2');
-  y.close();
-  try {
-    y.postMessage('3');
-    ok(false, "PostMessage should throw if called after a close().");
-  } catch(e) {
-    ok(true, "PostMessage should throw if called after a close().");
-  }
-
-  var z = new BroadcastChannel('foo');
-  z.postMessage('done');
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTest);
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_pref.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for BroadcastChannel</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<div id="content"></div>
-
-<script type="application/javascript">
-
-function testNoPref() {
-  SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", false]]}, function() {
-    ok(!("BroadcastChannel" in window), "BroadcastChannel should not exist");
-    runTests();
-  });
-}
-
-function testPref() {
-  SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, function() {
-    ok("BroadcastChannel" in window, "BroadcastChannel should exist");
-    runTests();
-  });
-}
-
-function testNoPrefWorker() {
-  SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", false]]}, function() {
-    var worker = new Worker("broadcastchannel_pref_worker.js");
-    worker.onmessage = function(event) {
-      ok(!event.data.exists, "BroadcastChannel should not exist in workers");
-      runTests();
-    }
-    worker.postMessage('go!');
-  });
-}
-
-function testPrefWorker() {
-  SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, function() {
-    var worker = new Worker("broadcastchannel_pref_worker.js");
-    worker.onmessage = function(event) {
-      ok(event.data.exists, "BroadcastChannel should exist in workers");
-      runTests();
-    }
-    worker.postMessage('go!');
-  });
-}
-
-var tests = [
-  testNoPref,
-  testPref,
-  testNoPrefWorker,
-  testPrefWorker
-];
-
-function runTests() {
-  if (tests.length == 0) {
-    SimpleTest.finish();
-    return;
-  }
-
-  var test = tests.shift();
-  test();
-}
-
-SimpleTest.waitForExplicitFinish();
-runTests();
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_self.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for BroadcastChannel</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<div id="content"></div>
-
-<script type="application/javascript">
-
-function runTest() {
-  x = new BroadcastChannel('foo');
-  y = new BroadcastChannel('foo');
-
-  function func(e) {
-    is(e.target, y, "The target is !x");
-
-    SimpleTest.executeSoon(function() {
-      SimpleTest.finish();
-    });
-  }
-
-  x.onmessage = func;
-  y.onmessage = func;
-
-  x.postMessage('foo');
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTest);
-
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_sharedWorker.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<!--
-Tests of DOM BroadcastChannel in SharedWorkers
--->
-<head>
-  <title>Test for BroadcastChannel in SharedWorkers</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" language="javascript">
-
-function runTests() {
-  var worker = new SharedWorker("broadcastchannel_sharedWorker.js");
-
-  var bc = new BroadcastChannel('foobar');
-
-  worker.port.onmessage = function(event) {
-    if (event.data == "READY") {
-      ok(true, "SharedWorker is ready!");
-      bc.postMessage('hello world from the window');
-    } else if(event.data == "OK") {
-      ok(true, "SharedWorker has received the message");
-    } else {
-      ok(false, "Something wrong happened");
-    }
-  };
-
-  bc.onmessage = function(event) {
-    is("hello world from the worker", event.data, "The message matches!");
-    bc.close();
-    SimpleTest.finish();
-  }
-
-  worker.port.postMessage('go');
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true],
-                                   ["dom.workers.sharedWorkers.enabled", true]]}, runTests);
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_worker.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<!--
-Tests of DOM BroadcastChannel in workers
--->
-<head>
-  <title>Test for BroadcastChannel in workers</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" language="javascript">
-
-function testWorker(x) {
-  var worker = new Worker("broadcastchannel_worker.js");
-
-  var bc = new BroadcastChannel('foobar');
-
-  worker.onmessage = function(event) {
-    if (event.data == "READY") {
-      ok(true, "Worker is ready!");
-      bc.postMessage('hello world from the window');
-    } else {
-      ok(false, "Something wrong happened");
-    }
-  };
-
-  bc.onmessage = function(event) {
-    is("hello world from the worker", event.data, "The message matches!");
-    bc.close();
-    runTests();
-  }
-
-  worker.postMessage(x);
-}
-
-var tests = [ 0, 3 ];
-function runTests() {
-  if (tests.length == 0) {
-    SimpleTest.finish();
-    return;
-  }
-
-  testWorker(tests.shift());
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTests);
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_worker_alive.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<!--
-Tests of DOM BroadcastChannel in workers
--->
-<head>
-  <title>Test for BroadcastChannel in workers</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" language="javascript">
-
-function runTests() {
-  var id = 0;
-  (new BroadcastChannel('foobar')).onmessage = function(event) {
-    info("MSG: " + event.data);
-
-    if (event.data == "READY") {
-      ok(true, "Worker is ready!");
-    } else {
-      is(id, event.data, "The message is correct: " + id);
-    }
-
-    for (var i = 0; i < 3; ++i) {
-      SpecialPowers.forceCC();
-      SpecialPowers.forceGC();
-    }
-
-    if (id == 5) {
-      SimpleTest.finish();
-      return;
-    }
-
-    event.target.postMessage(++id);
-  };
-
-  new Worker("broadcastchannel_worker_alive.js");
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTests);
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/events/DOMEventTargetHelper.h
+++ b/dom/events/DOMEventTargetHelper.h
@@ -96,21 +96,16 @@ public:
       // nsISupports pointer. That must be fixed, or we'll crash...
       NS_ASSERTION(target_qi == target, "Uh, fix QI!");
     }
 #endif
 
     return static_cast<DOMEventTargetHelper*>(target);
   }
 
-  bool HasListenersFor(const nsAString& aType)
-  {
-    return mListenerManager && mListenerManager->HasListenersFor(aType);
-  }
-
   bool HasListenersFor(nsIAtom* aTypeWithOn)
   {
     return mListenerManager && mListenerManager->HasListenersFor(aTypeWithOn);
   }
 
   nsresult SetEventHandler(nsIAtom* aType,
                            JSContext* aCx,
                            const JS::Value& aValue);
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -1258,29 +1258,18 @@ EventListenerManager::MutationListenerBi
     }
   }
   return bits;
 }
 
 bool
 EventListenerManager::HasListenersFor(const nsAString& aEventName)
 {
-  if (mIsMainThreadELM) {
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(NS_LITERAL_STRING("on") + aEventName);
-    return HasListenersFor(atom);
-  }
-
-  uint32_t count = mListeners.Length();
-  for (uint32_t i = 0; i < count; ++i) {
-    Listener* listener = &mListeners.ElementAt(i);
-    if (listener->mTypeString == aEventName) {
-      return true;
-    }
-  }
-  return false;
+  nsCOMPtr<nsIAtom> atom = do_GetAtom(NS_LITERAL_STRING("on") + aEventName);
+  return HasListenersFor(atom);
 }
 
 bool
 EventListenerManager::HasListenersFor(nsIAtom* aEventNameWithOn)
 {
 #ifdef DEBUG
   nsAutoString name;
   aEventNameWithOn->ToString(name);
--- a/dom/events/MessageEvent.cpp
+++ b/dom/events/MessageEvent.cpp
@@ -114,33 +114,24 @@ MessageEvent::GetSource(Nullable<OwningW
 
 /* static */ already_AddRefed<MessageEvent>
 MessageEvent::Constructor(const GlobalObject& aGlobal,
                           const nsAString& aType,
                           const MessageEventInit& aParam,
                           ErrorResult& aRv)
 {
   nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
-  return Constructor(t, aType, aParam, aRv);
-}
-
-/* static */ already_AddRefed<MessageEvent>
-MessageEvent::Constructor(EventTarget* aEventTarget,
-                          const nsAString& aType,
-                          const MessageEventInit& aParam,
-                          ErrorResult& aRv)
-{
-  nsRefPtr<MessageEvent> event = new MessageEvent(aEventTarget, nullptr, nullptr);
+  nsRefPtr<MessageEvent> event = new MessageEvent(t, nullptr, nullptr);
 
   aRv = event->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
   if (aRv.Failed()) {
     return nullptr;
   }
 
-  bool trusted = event->Init(aEventTarget);
+  bool trusted = event->Init(t);
   event->SetTrusted(trusted);
 
   event->mData = aParam.mData;
 
   mozilla::HoldJSObjects(event.get());
 
   if (aParam.mOrigin.WasPassed()) {
     event->mOrigin = aParam.mOrigin.Value();
--- a/dom/events/MessageEvent.h
+++ b/dom/events/MessageEvent.h
@@ -69,22 +69,16 @@ public:
   }
 
   static already_AddRefed<MessageEvent>
   Constructor(const GlobalObject& aGlobal,
               const nsAString& aType,
               const MessageEventInit& aEventInit,
               ErrorResult& aRv);
 
-  static already_AddRefed<MessageEvent>
-  Constructor(EventTarget* aEventTarget,
-              const nsAString& aType,
-              const MessageEventInit& aEventInit,
-              ErrorResult& aRv);
-
 protected:
   ~MessageEvent();
 
 private:
   JS::Heap<JS::Value> mData;
   nsString mOrigin;
   nsString mLastEventId;
   nsCOMPtr<nsIDOMWindow> mWindowSource;
--- a/dom/ipc/StructuredCloneUtils.cpp
+++ b/dom/ipc/StructuredCloneUtils.cpp
@@ -21,27 +21,25 @@
 
 using namespace mozilla::dom;
 
 namespace {
 
 void
 Error(JSContext* aCx, uint32_t aErrorId)
 {
-  if (NS_IsMainThread()) {
-    NS_DOMStructuredCloneError(aCx, aErrorId);
-  } else {
-    Throw(aCx, NS_ERROR_DOM_DATA_CLONE_ERR);
-  }
+  MOZ_ASSERT(NS_IsMainThread());
+  NS_DOMStructuredCloneError(aCx, aErrorId);
 }
 
 JSObject*
 Read(JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
      uint32_t aData, void* aClosure)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aClosure);
 
   StructuredCloneClosure* closure =
     static_cast<StructuredCloneClosure*>(aClosure);
 
   if (aTag == SCTAG_DOM_BLOB) {
     // nsRefPtr<File> needs to go out of scope before toObjectOrNull() is
     // called because the static analysis thinks dereferencing XPCOM objects
@@ -77,16 +75,17 @@ Read(JSContext* aCx, JSStructuredCloneRe
 
   return NS_DOMReadStructuredClone(aCx, aReader, aTag, aData, nullptr);
 }
 
 bool
 Write(JSContext* aCx, JSStructuredCloneWriter* aWriter,
       JS::Handle<JSObject*> aObj, void* aClosure)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aClosure);
 
   StructuredCloneClosure* closure =
     static_cast<StructuredCloneClosure*>(aClosure);
 
   // See if the wrapped native is a File/Blob.
   {
     File* blob = nullptr;
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -88,17 +88,16 @@ DIRS += [
     'plugins/ipc',
     'indexedDB',
     'system',
     'ipc',
     'identity',
     'workers',
     'camera',
     'audiochannel',
-    'broadcastchannel',
     'promise',
     'smil',
     'telephony',
     'tv',
     'voicemail',
     'inputmethod',
     'webidl',
     'xbl',
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -195,18 +195,16 @@ var interfaceNamesInGlobalScope =
      permission: ["bluetooth"]},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "BluetoothManager", b2g: true, permission: ["bluetooth"]},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "BluetoothStatusChangedEvent", b2g: true, permission: ["bluetooth"]},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "BoxObject", xbl: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    {name: "BroadcastChannel", pref: "dom.broadcastChannel.enabled"},
-// IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CallEvent", b2g: true, pref: "dom.telephony.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CallGroupErrorEvent", b2g: true, pref: "dom.telephony.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CameraCapabilities", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CameraClosedEvent", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
deleted file mode 100644
--- a/dom/webidl/BroadcastChannel.webidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts
- */
-
-[Constructor(DOMString channel),
- Exposed=(Window,Worker),
- Func="BroadcastChannel::IsEnabled"]
-interface BroadcastChannel : EventTarget {
-  readonly attribute DOMString name;
-
-  [Throws]
-  void postMessage(any message);
-
-  void close();
-
-           attribute EventHandler onmessage;
-};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -50,17 +50,16 @@ WEBIDL_FILES = [
     'AutocompleteInfo.webidl',
     'BarProp.webidl',
     'BatteryManager.webidl',
     'BeforeAfterKeyboardEvent.webidl',
     'BeforeUnloadEvent.webidl',
     'BiquadFilterNode.webidl',
     'Blob.webidl',
     'BoxObject.webidl',
-    'BroadcastChannel.webidl',
     'BrowserElement.webidl',
     'BrowserElementDictionaries.webidl',
     'CallsList.webidl',
     'CameraCapabilities.webidl',
     'CameraControl.webidl',
     'CameraManager.webidl',
     'CameraUtil.webidl',
     'CanvasRenderingContext2D.webidl',
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -83,18 +83,16 @@ if (typeof Symbol === "function") {
 }
 
 // IMPORTANT: Do not change the list below without review from a DOM peer!
 var interfaceNamesInGlobalScope =
   [
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Blob",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    { name: "BroadcastChannel", pref: "dom.broadcastChannel.enabled" },
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "DedicatedWorkerGlobalScope",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     { name: "DataStore", b2g: true },
 // IMPORTANT: Do not change this list without review from a DOM peer!
     { name: "DataStoreCursor", b2g: true },
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DOMError",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "BackgroundChildImpl.h"
 
 #include "ActorsChild.h" // IndexedDB
-#include "BroadcastChannelChild.h"
 #include "FileDescriptorSetChild.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/PBlobChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/ipc/PBackgroundTestChild.h"
 #include "nsID.h"
 #include "nsTraceRefcnt.h"
@@ -181,40 +180,16 @@ BackgroundChildImpl::DeallocPFileDescrip
                                                 PFileDescriptorSetChild* aActor)
 {
   MOZ_ASSERT(aActor);
 
   delete static_cast<FileDescriptorSetChild*>(aActor);
   return true;
 }
 
-// -----------------------------------------------------------------------------
-// BroadcastChannel API
-// -----------------------------------------------------------------------------
-
-dom::PBroadcastChannelChild*
-BackgroundChildImpl::AllocPBroadcastChannelChild(const PrincipalInfo& aPrincipalInfo,
-                                                 const nsString& aOrigin,
-                                                 const nsString& aChannel)
-{
-  nsRefPtr<dom::BroadcastChannelChild> agent =
-    new dom::BroadcastChannelChild(aOrigin, aChannel);
-  return agent.forget().take();
-}
-
-bool
-BackgroundChildImpl::DeallocPBroadcastChannelChild(
-                                                 PBroadcastChannelChild* aActor)
-{
-  nsRefPtr<dom::BroadcastChannelChild> child =
-    dont_AddRef(static_cast<dom::BroadcastChannelChild*>(aActor));
-  MOZ_ASSERT(child);
-  return true;
-}
-
 } // namespace ipc
 } // namespace mozilla
 
 bool
 TestChild::Recv__delete__(const nsCString& aTestArg)
 {
   MOZ_RELEASE_ASSERT(aTestArg == mTestArg,
                      "BackgroundTest message was corrupted!");
--- a/ipc/glue/BackgroundChildImpl.h
+++ b/ipc/glue/BackgroundChildImpl.h
@@ -65,24 +65,16 @@ protected:
   DeallocPBlobChild(PBlobChild* aActor) MOZ_OVERRIDE;
 
   virtual PFileDescriptorSetChild*
   AllocPFileDescriptorSetChild(const FileDescriptor& aFileDescriptor)
                                MOZ_OVERRIDE;
 
   virtual bool
   DeallocPFileDescriptorSetChild(PFileDescriptorSetChild* aActor) MOZ_OVERRIDE;
-
-  virtual PBroadcastChannelChild*
-  AllocPBroadcastChannelChild(const PrincipalInfo& aPrincipalInfo,
-                              const nsString& aOrigin,
-                              const nsString& aChannel) MOZ_OVERRIDE;
-
-  virtual bool
-  DeallocPBroadcastChannelChild(PBroadcastChannelChild* aActor) MOZ_OVERRIDE;
 };
 
 class BackgroundChildImpl::ThreadLocal MOZ_FINAL
 {
   friend class nsAutoPtr<ThreadLocal>;
 
 public:
   nsAutoPtr<mozilla::dom::indexedDB::ThreadLocal> mIndexedDBThreadLocal;
--- a/ipc/glue/BackgroundParentImpl.cpp
+++ b/ipc/glue/BackgroundParentImpl.cpp
@@ -1,26 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "BackgroundParentImpl.h"
 
-#include "BroadcastChannelParent.h"
 #include "FileDescriptorSetParent.h"
-#include "mozilla/AppProcessChecker.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/PBlobParent.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/ipc/BackgroundParent.h"
-#include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/PBackgroundTestParent.h"
-#include "nsNetUtil.h"
 #include "nsThreadUtils.h"
 #include "nsTraceRefcnt.h"
 #include "nsXULAppAPI.h"
 
 #ifdef DISABLE_ASSERTS_FOR_FUZZING
 #define ASSERT_UNLESS_FUZZING(...) do { } while (0)
 #else
 #define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false)
@@ -62,19 +57,16 @@ public:
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 };
 
 } // anonymous namespace
 
 namespace mozilla {
 namespace ipc {
 
-using mozilla::dom::ContentParent;
-using mozilla::dom::BroadcastChannelParent;
-
 BackgroundParentImpl::BackgroundParentImpl()
 {
   AssertIsInMainProcess();
   AssertIsOnMainThread();
 
   MOZ_COUNT_CTOR(mozilla::ipc::BackgroundParentImpl);
 }
 
@@ -210,126 +202,16 @@ BackgroundParentImpl::DeallocPFileDescri
   AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<FileDescriptorSetParent*>(aActor);
   return true;
 }
 
-mozilla::dom::PBroadcastChannelParent*
-BackgroundParentImpl::AllocPBroadcastChannelParent(
-                                            const PrincipalInfo& aPrincipalInfo,
-                                            const nsString& aOrigin,
-                                            const nsString& aChannel)
-{
-  AssertIsInMainProcess();
-  AssertIsOnBackgroundThread();
-
-  return new BroadcastChannelParent(aOrigin, aChannel);
-}
-
-namespace {
-
-class CheckPrincipalRunnable MOZ_FINAL : public nsRunnable
-{
-public:
-  CheckPrincipalRunnable(already_AddRefed<ContentParent> aParent,
-                         const PrincipalInfo& aPrincipalInfo,
-                         const nsString& aOrigin)
-    : mContentParent(aParent)
-    , mPrincipalInfo(aPrincipalInfo)
-    , mOrigin(aOrigin)
-    , mBackgroundThread(NS_GetCurrentThread())
-  {
-    AssertIsInMainProcess();
-    AssertIsOnBackgroundThread();
-
-    MOZ_ASSERT(mContentParent);
-    MOZ_ASSERT(mBackgroundThread);
-  }
-
-  NS_IMETHODIMP Run()
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    nsCOMPtr<nsIPrincipal> principal = PrincipalInfoToPrincipal(mPrincipalInfo);
-    AssertAppPrincipal(mContentParent, principal);
-
-    bool isNullPrincipal;
-    nsresult rv = principal->GetIsNullPrincipal(&isNullPrincipal);
-    if (NS_WARN_IF(NS_FAILED(rv)) || isNullPrincipal) {
-      mContentParent->KillHard();
-      return NS_OK;
-    }
-
-    nsCOMPtr<nsIURI> uri;
-    rv = NS_NewURI(getter_AddRefs(uri), mOrigin);
-    if (NS_FAILED(rv) || !uri) {
-      mContentParent->KillHard();
-      return NS_OK;
-    }
-
-    rv = principal->CheckMayLoad(uri, false, false);
-    if (NS_FAILED(rv)) {
-      mContentParent->KillHard();
-      return NS_OK;
-    }
-
-    mContentParent = nullptr;
-    return NS_OK;
-  }
-
-private:
-  nsRefPtr<ContentParent> mContentParent;
-  PrincipalInfo mPrincipalInfo;
-  nsString mOrigin;
-  nsCOMPtr<nsIThread> mBackgroundThread;
-};
-
-} // anonymous namespace
-
-bool
-BackgroundParentImpl::RecvPBroadcastChannelConstructor(
-                                            PBroadcastChannelParent* actor,
-                                            const PrincipalInfo& aPrincipalInfo,
-                                            const nsString& aOrigin,
-                                            const nsString& aChannel)
-{
-  AssertIsInMainProcess();
-  AssertIsOnBackgroundThread();
-
-  nsRefPtr<ContentParent> parent = BackgroundParent::GetContentParent(this);
-
-  // If the ContentParent is null we are dealing with a same-process actor.
-  if (!parent) {
-    MOZ_ASSERT(aPrincipalInfo.type() != PrincipalInfo::TNullPrincipalInfo);
-    return true;
-  }
-
-  nsRefPtr<CheckPrincipalRunnable> runnable =
-    new CheckPrincipalRunnable(parent.forget(), aPrincipalInfo, aOrigin);
-  nsresult rv = NS_DispatchToMainThread(runnable);
-  MOZ_ALWAYS_TRUE(NS_SUCCEEDED(rv));
-
-  return true;
-}
-
-bool
-BackgroundParentImpl::DeallocPBroadcastChannelParent(
-                                                PBroadcastChannelParent* aActor)
-{
-  AssertIsInMainProcess();
-  AssertIsOnBackgroundThread();
-  MOZ_ASSERT(aActor);
-
-  delete static_cast<BroadcastChannelParent*>(aActor);
-  return true;
-}
-
 } // namespace ipc
 } // namespace mozilla
 
 void
 TestParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
--- a/ipc/glue/BackgroundParentImpl.h
+++ b/ipc/glue/BackgroundParentImpl.h
@@ -53,28 +53,14 @@ protected:
 
   virtual PFileDescriptorSetParent*
   AllocPFileDescriptorSetParent(const FileDescriptor& aFileDescriptor)
                                 MOZ_OVERRIDE;
 
   virtual bool
   DeallocPFileDescriptorSetParent(PFileDescriptorSetParent* aActor)
                                   MOZ_OVERRIDE;
-
-  virtual PBroadcastChannelParent*
-  AllocPBroadcastChannelParent(const PrincipalInfo& aPrincipalInfo,
-                               const nsString& aOrigin,
-                               const nsString& aChannel) MOZ_OVERRIDE;
-
-  virtual bool
-  RecvPBroadcastChannelConstructor(PBroadcastChannelParent* actor,
-                                   const PrincipalInfo& aPrincipalInfo,
-                                   const nsString& origin,
-                                   const nsString& channel) MOZ_OVERRIDE;
-
-  virtual bool
-  DeallocPBroadcastChannelParent(PBroadcastChannelParent* aActor) MOZ_OVERRIDE;
 };
 
 } // namespace ipc
 } // namespace mozilla
 
 #endif // mozilla_ipc_backgroundparentimpl_h__
--- a/ipc/glue/PBackground.ipdl
+++ b/ipc/glue/PBackground.ipdl
@@ -1,41 +1,36 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBackgroundIDBFactory;
 include protocol PBackgroundTest;
 include protocol PBlob;
-include protocol PBroadcastChannel;
 include protocol PFileDescriptorSet;
 
 include DOMTypes;
-include PBackgroundSharedTypes;
 include PBackgroundIDBSharedTypes;
 
 namespace mozilla {
 namespace ipc {
 
 sync protocol PBackground
 {
   manages PBackgroundIDBFactory;
   manages PBackgroundTest;
   manages PBlob;
-  manages PBroadcastChannel;
   manages PFileDescriptorSet;
 
 parent:
   // Only called at startup during mochitests to check the basic infrastructure.
   PBackgroundTest(nsCString testArg);
 
   PBackgroundIDBFactory(LoggingInfo loggingInfo);
 
-  PBroadcastChannel(PrincipalInfo pInfo, nsString origin, nsString channel);
-
 both:
   PBlob(BlobConstructorParams params);
 
   PFileDescriptorSet(FileDescriptor fd);
 };
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -125,17 +125,16 @@ SOURCES += [
     'BackgroundParentImpl.cpp',
     'FileDescriptorSetChild.cpp',
     'FileDescriptorSetParent.cpp',
     'GeckoChildProcessHost.cpp',
     'URIUtils.cpp',
 ]
 
 LOCAL_INCLUDES += [
-    '/dom/broadcastchannel',
     '/dom/indexedDB',
     '/xpcom/build',
 ]
 
 IPDL_SOURCES = [
     'InputStreamParams.ipdlh',
     'PBackground.ipdl',
     'PBackgroundSharedTypes.ipdlh',
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4337,23 +4337,16 @@ pref("dom.mobileconnection.enabled", fal
 pref("dom.voicemail.enabled", true);
 #else
 pref("dom.voicemail.enabled", false);
 #endif
 // Numeric default service id for Voice Mail API calls with |serviceId|
 // parameter omitted.
 pref("dom.voicemail.defaultServiceId", 0);
 
-// DOM BroadcastChannel API.
-#ifdef RELEASE_BUILD
-pref("dom.broadcastChannel.enabled", false);
-#else
-pref("dom.broadcastChannel.enabled", true);
-#endif
-
 // DOM Inter-App Communication API.
 pref("dom.inter-app-communication-api.enabled", false);
 
 // Disable mapped array buffer by default.
 pref("dom.mapped_arraybuffer.enabled", false);
 
 // The tables used for Safebrowsing phishing and malware checks.
 pref("urlclassifier.malwareTable", "goog-malware-shavar,test-malware-simple");
--- a/testing/web-platform/meta/html/dom/interfaces.html.ini
+++ b/testing/web-platform/meta/html/dom/interfaces.html.ini
@@ -3544,16 +3544,37 @@
     expected: FAIL
 
   [PortCollection interface: operation iterate(PortCollectionCallback)]
     expected: FAIL
 
   [BroadcastChannel interface: existence and properties of interface object]
     expected: FAIL
 
+  [BroadcastChannel interface object length]
+    expected: FAIL
+
+  [BroadcastChannel interface: existence and properties of interface prototype object]
+    expected: FAIL
+
+  [BroadcastChannel interface: existence and properties of interface prototype object\'s "constructor" property]
+    expected: FAIL
+
+  [BroadcastChannel interface: attribute name]
+    expected: FAIL
+
+  [BroadcastChannel interface: operation postMessage(any)]
+    expected: FAIL
+
+  [BroadcastChannel interface: operation close()]
+    expected: FAIL
+
+  [BroadcastChannel interface: attribute onmessage]
+    expected: FAIL
+
   [WorkerGlobalScope interface: existence and properties of interface object]
     expected: FAIL
 
   [WorkerGlobalScope interface object length]
     expected: FAIL
 
   [WorkerGlobalScope interface: existence and properties of interface prototype object]
     expected: FAIL