Bug 1522579 - Part 2: Remove consumers of nsIContentParent, r=mccr8
☠☠ backed out by 2777f0053125 ☠ ☠
authorNika Layzell <nika@thelayzells.com>
Mon, 25 Feb 2019 15:51:12 +0000
changeset 518793 5c7aafa32a0a46330588c98516964e637163e834
parent 518792 a3c5a2c164113980f9a0075f0b70278c3e2fe122
child 518794 eda40fca075833f04fe28fc6855fd6dc423452b5
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1522579
milestone67.0a1
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
Bug 1522579 - Part 2: Remove consumers of nsIContentParent, r=mccr8 This patch tries to move them to `ContentParent` instead. `ProcessPriorityManagerImpl::ObserveContentParentCreated` could not be moved due to using `do_QueryInterface` to cast from a `nsISupports` down to the `ContentParent` object. This could be fixed to remove the interfaces entirely, but I left that for a follow-up. Depends on D20549 Differential Revision: https://phabricator.services.mozilla.com/D20550
dom/base/nsContentUtils.cpp
dom/base/nsContentUtils.h
dom/base/nsFocusManager.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsFrameMessageManager.cpp
dom/base/nsFrameMessageManager.h
dom/file/TemporaryFileBlobImpl.cpp
dom/file/ipc/IPCBlobInputStream.cpp
dom/file/ipc/IPCBlobInputStreamParent.cpp
dom/file/ipc/IPCBlobInputStreamParent.h
dom/file/ipc/IPCBlobUtils.cpp
dom/file/ipc/IPCBlobUtils.h
dom/indexedDB/FileSnapshot.cpp
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/FilePickerParent.cpp
dom/ipc/JSWindowActorParent.cpp
dom/ipc/RemoteFrameParent.cpp
dom/ipc/StructuredCloneData.cpp
dom/ipc/StructuredCloneData.h
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
dom/ipc/nsIContentParent.cpp
dom/ipc/nsIContentParent.h
dom/presentation/PresentationSessionInfo.h
ipc/glue/BackgroundImpl.cpp
ipc/glue/FileDescriptorSetParent.h
ipc/glue/IPCStreamParent.cpp
ipc/glue/IPCStreamSource.h
ipc/glue/IPCStreamUtils.cpp
ipc/glue/IPCStreamUtils.h
ipc/glue/InputStreamUtils.cpp
ipc/glue/InputStreamUtils.h
ipc/glue/nsIIPCSerializableInputStream.h
netwerk/base/PartiallySeekableInputStream.cpp
netwerk/base/nsBufferedStreams.cpp
netwerk/base/nsFileStreams.cpp
netwerk/base/nsMIMEInputStream.cpp
toolkit/components/extensions/webrequest/ChannelWrapper.cpp
toolkit/components/extensions/webrequest/ChannelWrapper.h
toolkit/components/extensions/webrequest/WebRequestService.cpp
toolkit/components/extensions/webrequest/WebRequestService.h
xpcom/io/InputStreamLengthWrapper.cpp
xpcom/io/NonBlockingAsyncInputStream.cpp
xpcom/io/SlicedInputStream.cpp
xpcom/io/nsMultiplexInputStream.cpp
xpcom/io/nsStorageStream.cpp
xpcom/io/nsStringStream.cpp
xpcom/tests/gtest/TestNonBlockingAsyncInputStream.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7247,17 +7247,17 @@ void nsContentUtils::SetKeyboardIndicato
                           (void*)&stateInfo);
 }
 
 nsresult nsContentUtils::IPCTransferableToTransferable(
     const IPCDataTransfer& aDataTransfer, const bool& aIsPrivateData,
     nsIPrincipal* aRequestingPrincipal,
     const nsContentPolicyType& aContentPolicyType,
     nsITransferable* aTransferable,
-    mozilla::dom::nsIContentParent* aContentParent,
+    mozilla::dom::ContentParent* aContentParent,
     mozilla::dom::TabChild* aTabChild) {
   nsresult rv;
 
   const nsTArray<IPCDataTransferItem>& items = aDataTransfer.items();
   for (const auto& item : items) {
     aTransferable->AddDataFlavor(item.flavor().get());
 
     if (item.data().type() == IPCDataTransferData::TnsString) {
@@ -7309,17 +7309,17 @@ nsresult nsContentUtils::IPCTransferable
   aTransferable->SetRequestingPrincipal(aRequestingPrincipal);
   aTransferable->SetContentPolicyType(aContentPolicyType);
   return NS_OK;
 }
 
 void nsContentUtils::TransferablesToIPCTransferables(
     nsIArray* aTransferables, nsTArray<IPCDataTransfer>& aIPC,
     bool aInSyncMessage, mozilla::dom::nsIContentChild* aChild,
-    mozilla::dom::nsIContentParent* aParent) {
+    mozilla::dom::ContentParent* aParent) {
   aIPC.Clear();
   if (aTransferables) {
     uint32_t transferableCount = 0;
     aTransferables->GetLength(&transferableCount);
     for (uint32_t i = 0; i < transferableCount; ++i) {
       IPCDataTransfer* dt = aIPC.AppendElement();
       nsCOMPtr<nsITransferable> transferable =
           do_QueryElementAt(aTransferables, i);
@@ -7442,17 +7442,17 @@ bool nsContentUtils::IsFlavorImage(const
   return aFlavor.EqualsLiteral(kNativeImageMime) ||
          aFlavor.EqualsLiteral(kJPEGImageMime) ||
          aFlavor.EqualsLiteral(kJPGImageMime) ||
          aFlavor.EqualsLiteral(kPNGImageMime) ||
          aFlavor.EqualsLiteral(kGIFImageMime);
 }
 
 static Shmem ConvertToShmem(mozilla::dom::nsIContentChild* aChild,
-                            mozilla::dom::nsIContentParent* aParent,
+                            mozilla::dom::ContentParent* aParent,
                             const nsACString& aInput) {
   MOZ_ASSERT((aChild && !aParent) || (!aChild && aParent));
 
   IShmemAllocator* allocator = aChild ? static_cast<IShmemAllocator*>(aChild)
                                       : static_cast<IShmemAllocator*>(aParent);
 
   Shmem result;
   if (!allocator->AllocShmem(aInput.Length(), SharedMemory::TYPE_BASIC,
@@ -7463,17 +7463,17 @@ static Shmem ConvertToShmem(mozilla::dom
   memcpy(result.get<char>(), aInput.BeginReading(), aInput.Length());
 
   return result;
 }
 
 void nsContentUtils::TransferableToIPCTransferable(
     nsITransferable* aTransferable, IPCDataTransfer* aIPCDataTransfer,
     bool aInSyncMessage, mozilla::dom::nsIContentChild* aChild,
-    mozilla::dom::nsIContentParent* aParent) {
+    mozilla::dom::ContentParent* aParent) {
   MOZ_ASSERT((aChild && !aParent) || (!aChild && aParent));
 
   if (aTransferable) {
     nsTArray<nsCString> flavorList;
     aTransferable->FlavorsTransferableCanExport(flavorList);
 
     for (uint32_t j = 0; j < flavorList.Length(); ++j) {
       nsCString& flavorStr = flavorList[j];
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -140,17 +140,17 @@ class EventTarget;
 class HTMLInputElement;
 class IPCDataTransfer;
 class IPCDataTransferItem;
 struct LifecycleCallbackArgs;
 struct LifecycleAdoptedCallbackArgs;
 class MessageBroadcaster;
 class NodeInfo;
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 class TabChild;
 class Selection;
 class TabParent;
 }  // namespace dom
 
 namespace ipc {
 class Shmem;
 class IShmemAllocator;
@@ -2828,29 +2828,29 @@ class nsContentUtils {
    */
   static bool IsFlavorImage(const nsACString& aFlavor);
 
   static nsresult IPCTransferableToTransferable(
       const mozilla::dom::IPCDataTransfer& aDataTransfer,
       const bool& aIsPrivateData, nsIPrincipal* aRequestingPrincipal,
       const nsContentPolicyType& aContentPolicyType,
       nsITransferable* aTransferable,
-      mozilla::dom::nsIContentParent* aContentParent,
+      mozilla::dom::ContentParent* aContentParent,
       mozilla::dom::TabChild* aTabChild);
 
   static void TransferablesToIPCTransferables(
       nsIArray* aTransferables, nsTArray<mozilla::dom::IPCDataTransfer>& aIPC,
       bool aInSyncMessage, mozilla::dom::nsIContentChild* aChild,
-      mozilla::dom::nsIContentParent* aParent);
+      mozilla::dom::ContentParent* aParent);
 
   static void TransferableToIPCTransferable(
       nsITransferable* aTransferable,
       mozilla::dom::IPCDataTransfer* aIPCDataTransfer, bool aInSyncMessage,
       mozilla::dom::nsIContentChild* aChild,
-      mozilla::dom::nsIContentParent* aParent);
+      mozilla::dom::ContentParent* aParent);
 
   /*
    * Get the pixel data from the given source surface and return it as a buffer.
    * The length and stride will be assigned from the surface.
    */
   static mozilla::UniquePtr<char[]> GetSurfaceData(
       mozilla::NotNull<mozilla::gfx::DataSourceSurface*> aSurface,
       size_t* aLength, int32_t* aStride);
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -8,17 +8,17 @@
 
 #include "nsFocusManager.h"
 
 #include "ChildIterator.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsGkAtoms.h"
 #include "nsGlobalWindow.h"
 #include "nsContentUtils.h"
-#include "nsIContentParent.h"
+#include "ContentParent.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDOMChromeWindow.h"
 #include "nsIHTMLDocument.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIFormControl.h"
 #include "nsLayoutUtils.h"
 #include "nsIPresShell.h"
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -2725,17 +2725,17 @@ class nsAsyncMessageToChild : public nsS
 nsresult nsFrameLoader::DoSendAsyncMessage(JSContext* aCx,
                                            const nsAString& aMessage,
                                            StructuredCloneData& aData,
                                            JS::Handle<JSObject*> aCpows,
                                            nsIPrincipal* aPrincipal) {
   TabParent* tabParent = mRemoteBrowser;
   if (tabParent) {
     ClonedMessageData data;
-    nsIContentParent* cp = tabParent->Manager();
+    ContentParent* cp = tabParent->Manager();
     if (!BuildClonedMessageDataForParent(cp, aData, data)) {
       MOZ_CRASH();
       return NS_ERROR_DOM_DATA_CLONE_ERR;
     }
     InfallibleTArray<mozilla::jsipc::CpowEntry> cpows;
     jsipc::CPOWManager* mgr = cp->GetCPOWManager();
     if (aCpows && (!mgr || !mgr->Wrap(aCx, aCpows, &cpows))) {
       return NS_ERROR_UNEXPECTED;
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -163,17 +163,17 @@ void MessageManagerCallback::DoGetRemote
   if (!parent) {
     return;
   }
 
   parent->GetRemoteType(aRemoteType, aError);
 }
 
 bool MessageManagerCallback::BuildClonedMessageDataForParent(
-    nsIContentParent* aParent, StructuredCloneData& aData,
+    ContentParent* aParent, StructuredCloneData& aData,
     ClonedMessageData& aClonedData) {
   return aData.BuildClonedMessageDataForParent(aParent, aClonedData);
 }
 
 bool MessageManagerCallback::BuildClonedMessageDataForChild(
     nsIContentChild* aChild, StructuredCloneData& aData,
     ClonedMessageData& aClonedData) {
   return aData.BuildClonedMessageDataForChild(aChild, aClonedData);
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -39,17 +39,17 @@ class nsFrameLoader;
 namespace mozilla {
 
 namespace ipc {
 class FileDescriptor;
 }
 
 namespace dom {
 
-class nsIContentParent;
+class ContentParent;
 class nsIContentChild;
 class ChildProcessMessageManager;
 class ChromeMessageBroadcaster;
 class ClonedMessageData;
 class MessageBroadcaster;
 class MessageListener;
 class MessageListenerManager;
 class MessageManagerReporter;
@@ -105,17 +105,17 @@ class MessageManagerCallback {
       const {
     return nullptr;
   }
 
   virtual void DoGetRemoteType(nsAString& aRemoteType,
                                ErrorResult& aError) const;
 
  protected:
-  bool BuildClonedMessageDataForParent(nsIContentParent* aParent,
+  bool BuildClonedMessageDataForParent(ContentParent* aParent,
                                        StructuredCloneData& aData,
                                        ClonedMessageData& aClonedData);
   bool BuildClonedMessageDataForChild(nsIContentChild* aChild,
                                       StructuredCloneData& aData,
                                       ClonedMessageData& aClonedData);
 };
 
 void UnpackClonedMessageDataForParent(const ClonedMessageData& aClonedData,
--- a/dom/file/TemporaryFileBlobImpl.cpp
+++ b/dom/file/TemporaryFileBlobImpl.cpp
@@ -62,17 +62,17 @@ class TemporaryFileInputStream final : p
                  uint32_t aMaxSize, uint32_t* aSizeUsed,
                  PBackgroundChild* aManager) override {
     MOZ_CRASH("This inputStream cannot be serialized.");
   }
 
   void Serialize(InputStreamParams& aParams,
                  FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
                  uint32_t aMaxSize, uint32_t* aSizeUsed,
-                 nsIContentParent* aManager) override {
+                 ContentParent* aManager) override {
     MOZ_CRASH("This inputStream cannot be serialized.");
   }
 
   void Serialize(InputStreamParams& aParams,
                  FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
                  uint32_t aMaxSize, uint32_t* aSizeUsed,
                  PBackgroundParent* aManager) override {
     MOZ_CRASH("This inputStream cannot be serialized.");
--- a/dom/file/ipc/IPCBlobInputStream.cpp
+++ b/dom/file/ipc/IPCBlobInputStream.cpp
@@ -584,17 +584,17 @@ void IPCBlobInputStream::Serialize(mozil
 
   SerializeInternal(aParams);
 }
 
 void IPCBlobInputStream::Serialize(mozilla::ipc::InputStreamParams& aParams,
                                    FileDescriptorArray& aFileDescriptors,
                                    bool aDelayedStart, uint32_t aMaxSize,
                                    uint32_t* aSizeUsed,
-                                   nsIContentParent* aManager) {
+                                   ContentParent* aManager) {
   MOZ_ASSERT(aSizeUsed);
   *aSizeUsed = 0;
 
   SerializeInternal(aParams);
 }
 
 void IPCBlobInputStream::Serialize(mozilla::ipc::InputStreamParams& aParams,
                                    FileDescriptorArray& aFileDescriptors,
--- a/dom/file/ipc/IPCBlobInputStreamParent.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamParent.cpp
@@ -43,17 +43,17 @@ IPCBlobInputStreamParent::Create(const n
 
   actor->mCallback = IPCBlobInputStreamStorage::Get()->TakeCallback(aID);
 
   return actor.forget();
 }
 
 IPCBlobInputStreamParent::IPCBlobInputStreamParent(const nsID& aID,
                                                    uint64_t aSize,
-                                                   nsIContentParent* aManager)
+                                                   ContentParent* aManager)
     : mID(aID),
       mSize(aSize),
       mContentManager(aManager),
       mPBackgroundManager(nullptr),
       mMigrating(false) {}
 
 IPCBlobInputStreamParent::IPCBlobInputStreamParent(const nsID& aID,
                                                    uint64_t aSize,
--- a/dom/file/ipc/IPCBlobInputStreamParent.h
+++ b/dom/file/ipc/IPCBlobInputStreamParent.h
@@ -56,29 +56,29 @@ class IPCBlobInputStreamParent final
   mozilla::ipc::IPCResult RecvClose();
 
   mozilla::ipc::IPCResult Recv__delete__() override;
 
   bool HasValidStream() const;
 
  private:
   IPCBlobInputStreamParent(const nsID& aID, uint64_t aSize,
-                           nsIContentParent* aManager);
+                           ContentParent* aManager);
 
   IPCBlobInputStreamParent(const nsID& aID, uint64_t aSize,
                            mozilla::ipc::PBackgroundParent* aManager);
 
   ~IPCBlobInputStreamParent() = default;
 
   const nsID mID;
   const uint64_t mSize;
 
   // Only 1 of these 2 is set. Raw pointer because these 2 managers are keeping
   // the parent actor alive. The pointers will be nullified in ActorDestroyed.
-  nsIContentParent* mContentManager;
+  ContentParent* mContentManager;
   mozilla::ipc::PBackgroundParent* mPBackgroundManager;
 
   RefPtr<IPCBlobInputStreamParentCallback> mCallback;
 
   bool mMigrating;
 };
 
 }  // namespace dom
--- a/dom/file/ipc/IPCBlobUtils.cpp
+++ b/dom/file/ipc/IPCBlobUtils.cpp
@@ -129,17 +129,17 @@ nsresult SerializeInputStreamChild(nsIIn
   }
 
   aIPCBlob.inputStream() = ipcStream.TakeValue();
   return NS_OK;
 }
 
 nsresult SerializeInputStream(nsIInputStream* aInputStream, uint64_t aSize,
                               uint64_t aChildID, IPCBlob& aIPCBlob,
-                              nsIContentParent* aManager) {
+                              ContentParent* aManager) {
   return SerializeInputStreamParent(aInputStream, aSize, aChildID, aIPCBlob,
                                     aManager);
 }
 
 nsresult SerializeInputStream(nsIInputStream* aInputStream, uint64_t aSize,
                               uint64_t aChildID, IPCBlob& aIPCBlob,
                               PBackgroundParent* aManager) {
   return SerializeInputStreamParent(aInputStream, aSize, aChildID, aIPCBlob,
@@ -153,17 +153,17 @@ nsresult SerializeInputStream(nsIInputSt
 }
 
 nsresult SerializeInputStream(nsIInputStream* aInputStream, uint64_t aSize,
                               uint64_t aChildID, IPCBlob& aIPCBlob,
                               PBackgroundChild* aManager) {
   return SerializeInputStreamChild(aInputStream, aIPCBlob, aManager);
 }
 
-uint64_t ChildIDFromManager(nsIContentParent* aManager) {
+uint64_t ChildIDFromManager(ContentParent* aManager) {
   return aManager->ChildID();
 }
 
 uint64_t ChildIDFromManager(PBackgroundParent* aManager) {
   return BackgroundParent::GetChildID(aManager);
 }
 
 uint64_t ChildIDFromManager(nsIContentChild* aManager) { return 0; }
@@ -237,17 +237,17 @@ nsresult Serialize(BlobImpl* aBlobImpl, 
   return SerializeInternal(aBlobImpl, aManager, aIPCBlob);
 }
 
 nsresult Serialize(BlobImpl* aBlobImpl, PBackgroundChild* aManager,
                    IPCBlob& aIPCBlob) {
   return SerializeInternal(aBlobImpl, aManager, aIPCBlob);
 }
 
-nsresult Serialize(BlobImpl* aBlobImpl, nsIContentParent* aManager,
+nsresult Serialize(BlobImpl* aBlobImpl, ContentParent* aManager,
                    IPCBlob& aIPCBlob) {
   return SerializeInternal(aBlobImpl, aManager, aIPCBlob);
 }
 
 nsresult Serialize(BlobImpl* aBlobImpl, PBackgroundParent* aManager,
                    IPCBlob& aIPCBlob) {
   return SerializeInternal(aBlobImpl, aManager, aIPCBlob);
 }
--- a/dom/file/ipc/IPCBlobUtils.h
+++ b/dom/file/ipc/IPCBlobUtils.h
@@ -218,31 +218,31 @@ class IProtocol;
 class PBackgroundChild;
 class PBackgroundParent;
 }  // namespace ipc
 
 namespace dom {
 
 class IPCBlob;
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 
 namespace IPCBlobUtils {
 
 already_AddRefed<BlobImpl> Deserialize(const IPCBlob& aIPCBlob);
 
 // These 4 methods serialize aBlobImpl into aIPCBlob using the right manager.
 
 nsresult Serialize(BlobImpl* aBlobImpl, nsIContentChild* aManager,
                    IPCBlob& aIPCBlob);
 
 nsresult Serialize(BlobImpl* aBlobImpl,
                    mozilla::ipc::PBackgroundChild* aManager, IPCBlob& aIPCBlob);
 
-nsresult Serialize(BlobImpl* aBlobImpl, nsIContentParent* aManager,
+nsresult Serialize(BlobImpl* aBlobImpl, ContentParent* aManager,
                    IPCBlob& aIPCBlob);
 
 nsresult Serialize(BlobImpl* aBlobImpl,
                    mozilla::ipc::PBackgroundParent* aManager,
                    IPCBlob& aIPCBlob);
 
 // WARNING: If you pass any actor which does not have P{Content,Background} as
 // its toplevel protocol, this method will MOZ_CRASH.
--- a/dom/indexedDB/FileSnapshot.cpp
+++ b/dom/indexedDB/FileSnapshot.cpp
@@ -284,17 +284,17 @@ void StreamWrapper::Serialize(InputStrea
                               uint32_t* aSizeUsed, PBackgroundChild* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void StreamWrapper::Serialize(InputStreamParams& aParams,
                               FileDescriptorArray& aFileDescriptors,
                               bool aDelayedStart, uint32_t aMaxSize,
-                              uint32_t* aSizeUsed, nsIContentParent* aManager) {
+                              uint32_t* aSizeUsed, ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void StreamWrapper::Serialize(InputStreamParams& aParams,
                               FileDescriptorArray& aFileDescriptors,
                               bool aDelayedStart, uint32_t aMaxSize,
                               uint32_t* aSizeUsed,
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -73,16 +73,17 @@
 #include "mozilla/embedding/printingui/PrintingParent.h"
 #include "mozilla/extensions/StreamFilterParent.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/hal_sandbox/PHalParent.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ipc/CrashReporterHost.h"
+#include "mozilla/ipc/FileDescriptorSetParent.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/ipc/PChildToParentStreamParent.h"
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/IPCStreamUtils.h"
 #include "mozilla/intl/LocaleService.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/PAPZParent.h"
 #include "mozilla/layers/CompositorThread.h"
@@ -1096,17 +1097,17 @@ mozilla::ipc::IPCResult ContentParent::R
 
   bool isPreloadBrowser = false;
   nsAutoString isPreloadBrowserStr;
   if (aFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::preloadedState,
                              isPreloadBrowserStr)) {
     isPreloadBrowser = isPreloadBrowserStr.EqualsLiteral("preloaded");
   }
 
-  RefPtr<nsIContentParent> constructorSender;
+  RefPtr<ContentParent> constructorSender;
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Cannot allocate TabParent in content process");
   if (aOpenerContentParent) {
     constructorSender = aOpenerContentParent;
   } else {
     if (aContext.IsJSPlugin()) {
       constructorSender =
           GetNewOrUsedJSPluginProcess(aContext.JSPluginId(), initialPriority);
     } else {
@@ -4237,29 +4238,25 @@ mozilla::ipc::IPCResult ContentParent::R
     return IPC_OK();
   }
 
   formProcessor->ProvideContent(NS_LITERAL_STRING("SELECT"), *aContent,
                                 *aAttribute);
   return IPC_OK();
 }
 
-PFileDescriptorSetParent* ContentParent::SendPFileDescriptorSetConstructor(
-    const FileDescriptor& aFD) {
-  return PContentParent::SendPFileDescriptorSetConstructor(aFD);
-}
-
 PFileDescriptorSetParent* ContentParent::AllocPFileDescriptorSetParent(
     const FileDescriptor& aFD) {
-  return nsIContentParent::AllocPFileDescriptorSetParent(aFD);
+  return new FileDescriptorSetParent(aFD);
 }
 
 bool ContentParent::DeallocPFileDescriptorSetParent(
     PFileDescriptorSetParent* aActor) {
-  return nsIContentParent::DeallocPFileDescriptorSetParent(aActor);
+  delete static_cast<FileDescriptorSetParent*>(aActor);
+  return true;
 }
 
 bool ContentParent::IgnoreIPCPrincipal() {
   static bool sDidAddVarCache = false;
   static bool sIgnoreIPCPrincipal = false;
   if (!sDidAddVarCache) {
     sDidAddVarCache = true;
     Preferences::AddBoolVarCache(&sIgnoreIPCPrincipal,
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -424,24 +424,30 @@ class ContentParent final : public PCont
   virtual PChildToParentStreamParent* AllocPChildToParentStreamParent()
       override;
   virtual bool DeallocPChildToParentStreamParent(
       PChildToParentStreamParent* aActor) override;
 
   virtual PParentToChildStreamParent* SendPParentToChildStreamConstructor(
       PParentToChildStreamParent*) override;
 
-  virtual PFileDescriptorSetParent* SendPFileDescriptorSetConstructor(
-      const FileDescriptor&) override;
-
   virtual PParentToChildStreamParent* AllocPParentToChildStreamParent()
       override;
   virtual bool DeallocPParentToChildStreamParent(
       PParentToChildStreamParent* aActor) override;
 
+  virtual PIPCBlobInputStreamParent* SendPIPCBlobInputStreamConstructor(
+      PIPCBlobInputStreamParent* aActor, const nsID& aID,
+      const uint64_t& aSize) override;
+
+  virtual PBrowserParent* SendPBrowserConstructor(
+      PBrowserParent* actor, const TabId& aTabId, const TabId& aSameTabGroupsAs,
+      const IPCTabContext& context, const uint32_t& chromeFlags,
+      const ContentParentId& aCpId, const bool& aIsForBrowser) override;
+
   PHalParent* AllocPHalParent();
 
   virtual mozilla::ipc::IPCResult RecvPHalConstructor(
       PHalParent* aActor) override {
     return PContentParent::RecvPHalConstructor(aActor);
   }
 
   PHeapSnapshotTempFileHelperParent* AllocPHeapSnapshotTempFileHelperParent();
@@ -628,16 +634,18 @@ class ContentParent final : public PCont
   mozilla::ipc::IPCResult RecvWindowBlur(BrowsingContext* aContext);
   mozilla::ipc::IPCResult RecvWindowPostMessage(
       BrowsingContext* aContext, const ClonedMessageData& aMessage,
       const PostMessageData& aData);
 
   mozilla::ipc::IPCResult RecvSetUserGestureActivation(
       BrowsingContext* aContext, bool aNewValue);
 
+  FORWARD_SHMEM_ALLOCATOR_TO(PContentParent)
+
  protected:
   void OnChannelConnected(int32_t pid) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   bool ShouldContinueFromReplyTimeout() override;
 
   void OnVarChanged(const GfxVarUpdate& aVar) override;
@@ -659,40 +667,30 @@ class ContentParent final : public PCont
       sJSPluginContentParents;
   static StaticAutoPtr<LinkedList<ContentParent>> sContentParents;
 
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
   // Cached Mac sandbox params used when launching content processes.
   static StaticAutoPtr<std::vector<std::string>> sMacSandboxParams;
 #endif
 
-  // Hide the raw constructor methods since we don't want client code
-  // using them.
-  virtual PBrowserParent* SendPBrowserConstructor(
-      PBrowserParent* actor, const TabId& aTabId, const TabId& aSameTabGroupsAs,
-      const IPCTabContext& context, const uint32_t& chromeFlags,
-      const ContentParentId& aCpId, const bool& aIsForBrowser) override;
-  using PContentParent::SendPTestShellConstructor;
-
   // Set aLoadUri to true to load aURIToLoad and to false to only create the
   // window. aURIToLoad should always be provided, if available, to ensure
   // compatibility with GeckoView.
   mozilla::ipc::IPCResult CommonCreateWindow(
       PBrowserParent* aThisTab, bool aSetOpener, const uint32_t& aChromeFlags,
       const bool& aCalledFromJS, const bool& aPositionSpecified,
       const bool& aSizeSpecified, nsIURI* aURIToLoad,
       const nsCString& aFeatures, const nsCString& aBaseURI,
       const float& aFullZoom, uint64_t aNextTabParentId, const nsString& aName,
       nsresult& aResult, nsCOMPtr<nsITabParent>& aNewTabParent,
       bool* aWindowIsNew, int32_t& aOpenLocation,
       nsIPrincipal* aTriggeringPrincipal, uint32_t aReferrerPolicy,
       bool aLoadUri, nsIContentSecurityPolicy* aCsp);
 
-  FORWARD_SHMEM_ALLOCATOR_TO(PContentParent)
-
   enum RecordReplayState { eNotRecordingOrReplaying, eRecording, eReplaying };
 
   explicit ContentParent(int32_t aPluginID)
       : ContentParent(nullptr, EmptyString(), eNotRecordingOrReplaying,
                       EmptyString(), aPluginID) {}
   ContentParent(ContentParent* aOpener, const nsAString& aRemoteType,
                 RecordReplayState aRecordReplayState = eNotRecordingOrReplaying,
                 const nsAString& aRecordingFile = EmptyString())
@@ -834,20 +832,16 @@ class ContentParent final : public PCont
 
   virtual bool DeallocPBrowserParent(PBrowserParent* frame) override;
 
   virtual mozilla::ipc::IPCResult RecvPBrowserConstructor(
       PBrowserParent* actor, const TabId& tabId, const TabId& sameTabGroupAs,
       const IPCTabContext& context, const uint32_t& chromeFlags,
       const ContentParentId& cpId, const bool& isForBrowser) override;
 
-  virtual PIPCBlobInputStreamParent* SendPIPCBlobInputStreamConstructor(
-      PIPCBlobInputStreamParent* aActor, const nsID& aID,
-      const uint64_t& aSize) override;
-
   virtual PIPCBlobInputStreamParent* AllocPIPCBlobInputStreamParent(
       const nsID& aID, const uint64_t& aSize) override;
 
   virtual bool DeallocPIPCBlobInputStreamParent(
       PIPCBlobInputStreamParent* aActor) override;
 
   mozilla::ipc::IPCResult RecvIsSecureURI(
       const uint32_t& aType, const URIParams& aURI, const uint32_t& aFlags,
@@ -1078,21 +1072,20 @@ class ContentParent final : public PCont
                                                  const nsString& challenge,
                                                  const nsString& keytype,
                                                  const nsString& keyparams,
                                                  nsString* newValue);
 
   mozilla::ipc::IPCResult RecvKeygenProvideContent(
       nsString* aAttribute, nsTArray<nsString>* aContent);
 
-  virtual PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
-      const mozilla::ipc::FileDescriptor&) override;
+  PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
+      const mozilla::ipc::FileDescriptor&);
 
-  virtual bool DeallocPFileDescriptorSetParent(
-      PFileDescriptorSetParent*) override;
+  bool DeallocPFileDescriptorSetParent(PFileDescriptorSetParent*);
 
   PWebrtcGlobalParent* AllocPWebrtcGlobalParent();
   bool DeallocPWebrtcGlobalParent(PWebrtcGlobalParent* aActor);
 
   mozilla::ipc::IPCResult RecvUpdateDropEffect(const uint32_t& aDragAction,
                                                const uint32_t& aDropEffect);
 
   mozilla::ipc::IPCResult RecvShutdownProfile(const nsCString& aProfile);
--- a/dom/ipc/FilePickerParent.cpp
+++ b/dom/ipc/FilePickerParent.cpp
@@ -123,17 +123,17 @@ FilePickerParent::IORunnable::Run() {
 
   return NS_OK;
 }
 
 void FilePickerParent::IORunnable::Destroy() { mFilePickerParent = nullptr; }
 
 void FilePickerParent::SendFilesOrDirectories(
     const nsTArray<BlobImplOrString>& aData) {
-  nsIContentParent* parent = TabParent::GetFrom(Manager())->Manager();
+  ContentParent* parent = TabParent::GetFrom(Manager())->Manager();
 
   if (mMode == nsIFilePicker::modeGetFolder) {
     MOZ_ASSERT(aData.Length() <= 1);
     if (aData.IsEmpty()) {
       Unused << Send__delete__(this, void_t(), mResult);
       return;
     }
 
--- a/dom/ipc/JSWindowActorParent.cpp
+++ b/dom/ipc/JSWindowActorParent.cpp
@@ -89,17 +89,17 @@ void JSWindowActorParent::SendAsyncMessa
                          "JS Window Actor AsyncMessageToChild dispatch failed");
     return;
   }
 
   // If we're a cross-process, send the async message over the corresponding
   // actor.
   ClonedMessageData msgData;
   RefPtr<TabParent> tabParent = mManager->GetTabParent();
-  nsIContentParent* cp = tabParent->Manager();
+  ContentParent* cp = tabParent->Manager();
   if (!data.BuildClonedMessageDataForParent(cp, msgData)) {
     aRv.Throw(NS_ERROR_DOM_DATA_CLONE_ERR);
     return;
   }
 
   if (!mManager->SendAsyncMessage(mName, PromiseFlatString(aMessageName),
                                   msgData)) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
--- a/dom/ipc/RemoteFrameParent.cpp
+++ b/dom/ipc/RemoteFrameParent.cpp
@@ -30,17 +30,17 @@ nsresult RemoteFrameParent::Init(const n
   attrs.SyncAttributesWithPrivateBrowsing(false);
   MutableTabContext tabContext;
   tabContext.SetTabContext(false, 0, UIStateChangeType_Set,
                            UIStateChangeType_Set, attrs, aPresentationURL);
 
   ProcessPriority initialPriority = PROCESS_PRIORITY_FOREGROUND;
 
   // Get our ConstructorSender object.
-  RefPtr<nsIContentParent> constructorSender =
+  RefPtr<ContentParent> constructorSender =
       ContentParent::GetNewOrUsedBrowserProcess(
           nullptr, aRemoteType, initialPriority, nullptr, false);
   if (NS_WARN_IF(!constructorSender)) {
     MOZ_ASSERT(false, "Unable to allocate content process!");
     return NS_ERROR_FAILURE;
   }
 
   ContentProcessManager* cpm = ContentProcessManager::GetSingleton();
--- a/dom/ipc/StructuredCloneData.cpp
+++ b/dom/ipc/StructuredCloneData.cpp
@@ -190,17 +190,17 @@ bool BuildClonedMessageData(M* aManager,
       streams.AppendElement(stream->TakeValue());
     }
   }
 
   return true;
 }
 
 bool StructuredCloneData::BuildClonedMessageDataForParent(
-    nsIContentParent* aParent, ClonedMessageData& aClonedData) {
+    ContentParent* aParent, ClonedMessageData& aClonedData) {
   return BuildClonedMessageData(aParent, *this, aClonedData);
 }
 
 bool StructuredCloneData::BuildClonedMessageDataForChild(
     nsIContentChild* aChild, ClonedMessageData& aClonedData) {
   return BuildClonedMessageData(aChild, *this, aClonedData);
 }
 
--- a/dom/ipc/StructuredCloneData.h
+++ b/dom/ipc/StructuredCloneData.h
@@ -25,17 +25,17 @@ class AutoIPCStream;
 class PBackgroundChild;
 class PBackgroundParent;
 
 }  // namespace ipc
 
 namespace dom {
 
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 
 namespace ipc {
 
 /**
  * Wraps the non-reference-counted JSStructuredCloneData class to have a
  * reference count so that multiple StructuredCloneData instances can reference
  * a single underlying serialized representation.
  *
@@ -176,17 +176,17 @@ class StructuredCloneData : public Struc
 
   void Write(JSContext* aCx, JS::Handle<JS::Value> aValue,
              JS::Handle<JS::Value> aTransfers, ErrorResult& aRv);
 
   // Actor-varying methods to convert the structured clone stored in this holder
   // by a previous call to Write() into ClonedMessageData IPC representation.
   // (Blobs are represented in IPC by IPCBlob actors, so we need the parent to
   // be able to create them.)
-  bool BuildClonedMessageDataForParent(nsIContentParent* aParent,
+  bool BuildClonedMessageDataForParent(ContentParent* aParent,
                                        ClonedMessageData& aClonedData);
   bool BuildClonedMessageDataForChild(nsIContentChild* aChild,
                                       ClonedMessageData& aClonedData);
   bool BuildClonedMessageDataForBackgroundParent(
       mozilla::ipc::PBackgroundParent* aParent, ClonedMessageData& aClonedData);
   bool BuildClonedMessageDataForBackgroundChild(
       mozilla::ipc::PBackgroundChild* aChild, ClonedMessageData& aClonedData);
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -138,17 +138,17 @@ using mozilla::Unused;
 namespace mozilla {
 namespace dom {
 
 TabParent::LayerToTabParentTable* TabParent::sLayerToTabParentTable = nullptr;
 
 NS_IMPL_ISUPPORTS(TabParent, nsITabParent, nsIAuthPromptProvider,
                   nsISupportsWeakReference)
 
-TabParent::TabParent(nsIContentParent* aManager, const TabId& aTabId,
+TabParent::TabParent(ContentParent* aManager, const TabId& aTabId,
                      const TabContext& aContext, uint32_t aChromeFlags)
     : TabContext(aContext),
       mFrameElement(nullptr),
       mContentCache(*this),
       mRect(0, 0, 0, 0),
       mDimensions(0, 0),
       mOrientation(0),
       mDPI(0),
@@ -947,21 +947,17 @@ auto TabParent::AllocPIndexedDBPermissio
     const Principal& aPrincipal) -> PIndexedDBPermissionRequestParent* {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsCOMPtr<nsIPrincipal> principal(aPrincipal);
   if (!principal) {
     return nullptr;
   }
 
-  nsCOMPtr<nsIContentParent> manager = Manager();
-  if (!manager->IsContentParent()) {
-    MOZ_CRASH("Figure out security checks for bridged content!");
-  }
-
+  RefPtr<ContentParent> manager = Manager();
   if (NS_WARN_IF(!mFrameElement)) {
     return nullptr;
   }
 
   return mozilla::dom::indexedDB::AllocPIndexedDBPermissionRequestParent(
       mFrameElement, principal);
 }
 
@@ -2809,23 +2805,17 @@ TabParent::GetHasPresented(bool* aResult
 }
 
 void TabParent::NavigateByKey(bool aForward, bool aForDocumentNavigation) {
   Unused << SendNavigateByKey(aForward, aForDocumentNavigation);
 }
 
 NS_IMETHODIMP
 TabParent::TransmitPermissionsForPrincipal(nsIPrincipal* aPrincipal) {
-  nsCOMPtr<nsIContentParent> manager = Manager();
-  if (!manager->IsContentParent()) {
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  return manager->AsContentParent()->TransmitPermissionsForPrincipal(
-      aPrincipal);
+  return Manager()->TransmitPermissionsForPrincipal(aPrincipal);
 }
 
 NS_IMETHODIMP
 TabParent::GetHasBeforeUnload(bool* aResult) {
   *aResult = mHasBeforeUnload;
   return NS_OK;
 }
 
@@ -3225,26 +3215,20 @@ bool TabParent::TakeDragVisualization(
 bool TabParent::AsyncPanZoomEnabled() const {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   return widget && widget->AsyncPanZoomEnabled();
 }
 
 void TabParent::StartPersistence(uint64_t aOuterWindowID,
                                  nsIWebBrowserPersistDocumentReceiver* aRecv,
                                  ErrorResult& aRv) {
-  nsCOMPtr<nsIContentParent> manager = Manager();
-  if (!manager->IsContentParent()) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return;
-  }
   auto* actor = new WebBrowserPersistDocumentParent();
   actor->SetOnReady(aRecv);
-  bool ok =
-      manager->AsContentParent()->SendPWebBrowserPersistDocumentConstructor(
-          actor, this, aOuterWindowID);
+  bool ok = Manager()->SendPWebBrowserPersistDocumentConstructor(
+      actor, this, aOuterWindowID);
   if (!ok) {
     aRv.Throw(NS_ERROR_FAILURE);
   }
   // (The actor will be destroyed on constructor failure.)
 }
 
 NS_IMETHODIMP
 TabParent::StartApzAutoscroll(float aAnchorX, float aAnchorY,
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -64,17 +64,17 @@ namespace gfx {
 class SourceSurface;
 class DataSourceSurface;
 }  // namespace gfx
 
 namespace dom {
 
 class CanonicalBrowsingContext;
 class ClonedMessageData;
-class nsIContentParent;
+class ContentParent;
 class Element;
 class DataTransfer;
 
 namespace ipc {
 class StructuredCloneData;
 }  // namespace ipc
 
 class TabParent final : public PBrowserParent,
@@ -95,17 +95,17 @@ class TabParent final : public PBrowserP
   // Helper class for ContentParent::RecvCreateWindow.
   struct AutoUseNewTab;
 
   // nsITabParent
   NS_DECL_NSITABPARENT
   // nsIDOMEventListener interfaces
   NS_DECL_NSIDOMEVENTLISTENER
 
-  TabParent(nsIContentParent* aManager, const TabId& aTabId,
+  TabParent(ContentParent* aManager, const TabId& aTabId,
             const TabContext& aContext, uint32_t aChromeFlags);
 
   Element* GetOwnerElement() const { return mFrameElement; }
   already_AddRefed<nsPIDOMWindowOuter> GetParentWindowOuter();
 
   void SetOwnerElement(Element* aElement);
 
   void CacheFrameLoader(nsFrameLoader* aFrameLoader);
@@ -472,17 +472,17 @@ class TabParent final : public PBrowserP
   static TabParent* GetFrom(nsITabParent* aTabParent);
 
   static TabParent* GetFrom(PBrowserParent* aTabParent);
 
   static TabParent* GetFrom(nsIContent* aContent);
 
   static TabId GetTabIdFrom(nsIDocShell* docshell);
 
-  nsIContentParent* Manager() const { return mManager; }
+  ContentParent* Manager() const { return mManager; }
 
   /**
    * Let managees query if Destroy() is already called so they don't send out
    * messages when the PBrowser actor is being destroyed.
    */
   bool IsDestroyed() const { return mIsDestroyed; }
 
   // Returns the closest widget for our frameloader's content.
@@ -622,17 +622,17 @@ class TabParent final : public PBrowserP
 
   void DestroyInternal();
 
   void SetRenderLayersInternal(bool aEnabled, bool aForceRepaint);
 
   already_AddRefed<nsFrameLoader> GetFrameLoader(
       bool aUseCachedFrameLoaderAfterDestroy = false) const;
 
-  RefPtr<nsIContentParent> mManager;
+  RefPtr<ContentParent> mManager;
   void TryCacheDPIAndScale();
 
   bool AsyncPanZoomEnabled() const;
 
   // Cached value indicating the docshell active state of the remote browser.
   bool mDocShellIsActive;
 
   // Update state prior to routing an APZ-aware event to the child process.
--- a/dom/ipc/nsIContentParent.cpp
+++ b/dom/ipc/nsIContentParent.cpp
@@ -174,17 +174,17 @@ PBrowserParent* nsIContentParent::AllocP
 
   // And because we're allocating a remote browser, of course the
   // window is remote.
   chromeFlags |= nsIWebBrowserChrome::CHROME_REMOTE_WINDOW;
 
   MaybeInvalidTabContext tc(aContext);
   MOZ_ASSERT(tc.IsValid());
   TabParent* parent =
-      new TabParent(this, aTabId, tc.GetTabContext(), chromeFlags);
+      new TabParent(AsContentParent(), aTabId, tc.GetTabContext(), chromeFlags);
 
   // We release this ref in DeallocPBrowserParent()
   NS_ADDREF(parent);
   return parent;
 }
 
 bool nsIContentParent::DeallocPBrowserParent(PBrowserParent* aFrame) {
   TabParent* parent = TabParent::GetFrom(aFrame);
@@ -254,27 +254,16 @@ mozilla::ipc::IPCResult nsIContentParent
     ipc::UnpackClonedMessageDataForParent(aData, data);
 
     ppm->ReceiveMessage(ppm, nullptr, aMsg, true, &data, &cpows, aPrincipal,
                         aRetvals, IgnoreErrors());
   }
   return IPC_OK();
 }
 
-PFileDescriptorSetParent* nsIContentParent::AllocPFileDescriptorSetParent(
-    const FileDescriptor& aFD) {
-  return new FileDescriptorSetParent(aFD);
-}
-
-bool nsIContentParent::DeallocPFileDescriptorSetParent(
-    PFileDescriptorSetParent* aActor) {
-  delete static_cast<FileDescriptorSetParent*>(aActor);
-  return true;
-}
-
 PChildToParentStreamParent*
 nsIContentParent::AllocPChildToParentStreamParent() {
   return mozilla::ipc::AllocPChildToParentStreamParent();
 }
 
 bool nsIContentParent::DeallocPChildToParentStreamParent(
     PChildToParentStreamParent* aActor) {
   delete aActor;
--- a/dom/ipc/nsIContentParent.h
+++ b/dom/ipc/nsIContentParent.h
@@ -31,17 +31,16 @@ class Principal;
 namespace mozilla {
 
 namespace jsipc {
 class PJavaScriptParent;
 class CpowEntry;
 }  // namespace jsipc
 
 namespace ipc {
-class PFileDescriptorSetParent;
 class PChildToParentStreamParent;
 class PParentToChildStreamParent;
 class PIPCBlobInputStreamParent;
 }  // namespace ipc
 
 namespace dom {
 
 class Blob;
@@ -70,19 +69,16 @@ class nsIContentParent : public nsISuppo
       mozilla::ipc::PIPCBlobInputStreamParent* aActor, const nsID& aID,
       const uint64_t& aSize) = 0;
 
   MOZ_MUST_USE virtual PBrowserParent* SendPBrowserConstructor(
       PBrowserParent* actor, const TabId& aTabId, const TabId& aSameTabGroupAs,
       const IPCTabContext& context, const uint32_t& chromeFlags,
       const ContentParentId& aCpId, const bool& aIsForBrowser) = 0;
 
-  virtual mozilla::ipc::PFileDescriptorSetParent*
-  SendPFileDescriptorSetConstructor(const mozilla::ipc::FileDescriptor&) = 0;
-
   virtual bool IsContentParent() const { return false; }
 
   ContentParent* AsContentParent();
 
   mozilla::dom::ProcessMessageManager* GetMessageManager() const {
     return mMessageManager;
   }
 
@@ -117,22 +113,16 @@ class nsIContentParent : public nsISuppo
       const ContentParentId& cpId, const bool& isForBrowser);
 
   virtual mozilla::ipc::PIPCBlobInputStreamParent*
   AllocPIPCBlobInputStreamParent(const nsID& aID, const uint64_t& aSize);
 
   virtual bool DeallocPIPCBlobInputStreamParent(
       mozilla::ipc::PIPCBlobInputStreamParent* aActor);
 
-  virtual mozilla::ipc::PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
-      const mozilla::ipc::FileDescriptor& aFD);
-
-  virtual bool DeallocPFileDescriptorSetParent(
-      mozilla::ipc::PFileDescriptorSetParent* aActor);
-
   virtual mozilla::ipc::PChildToParentStreamParent*
   AllocPChildToParentStreamParent();
 
   virtual bool DeallocPChildToParentStreamParent(
       mozilla::ipc::PChildToParentStreamParent* aActor);
 
   virtual mozilla::ipc::PParentToChildStreamParent*
   AllocPParentToChildStreamParent();
--- a/dom/presentation/PresentationSessionInfo.h
+++ b/dom/presentation/PresentationSessionInfo.h
@@ -3,17 +3,17 @@
 /* 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_PresentationSessionInfo_h
 #define mozilla_dom_PresentationSessionInfo_h
 
 #include "base/process.h"
-#include "mozilla/dom/nsIContentParent.h"
+#include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/RefPtr.h"
 #include "nsCOMPtr.h"
 #include "nsINamed.h"
 #include "nsINetworkInfoService.h"
 #include "nsIPresentationControlChannel.h"
@@ -254,15 +254,15 @@ class PresentationPresentingInfo final :
   RefPtr<PresentationResponderLoadingCallback> mLoadingCallback;
   nsCOMPtr<nsITimer> mTimer;
   nsCOMPtr<nsIPresentationChannelDescription> mRequesterDescription;
   nsTArray<nsString> mPendingCandidates;
   RefPtr<Promise> mPromise;
 
   // The content parent communicating with the content process which the OOP
   // receiver page belongs to.
-  nsCOMPtr<nsIContentParent> mContentParent;
+  RefPtr<ContentParent> mContentParent;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_PresentationSessionInfo_h
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -756,17 +756,17 @@ intptr_t ParentImpl::GetRawContentParent
   auto actor = static_cast<ParentImpl*>(aBackgroundActor);
   if (actor->mActorDestroyed) {
     MOZ_ASSERT(false,
                "GetRawContentParentForComparison called after ActorDestroy was "
                "called!");
     return intptr_t(-1);
   }
 
-  return intptr_t(static_cast<nsIContentParent*>(actor->mContent.get()));
+  return intptr_t(static_cast<ContentParent*>(actor->mContent.get()));
 }
 
 // static
 uint64_t ParentImpl::GetChildID(PBackgroundParent* aBackgroundActor) {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aBackgroundActor);
 
   auto actor = static_cast<ParentImpl*>(aBackgroundActor);
--- a/ipc/glue/FileDescriptorSetParent.h
+++ b/ipc/glue/FileDescriptorSetParent.h
@@ -11,28 +11,28 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/ipc/PFileDescriptorSetParent.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 
 namespace dom {
 
-class nsIContentParent;
+class ContentParent;
 
 }  // namespace dom
 
 namespace ipc {
 
 class BackgroundParentImpl;
 class FileDescriptor;
 
 class FileDescriptorSetParent final : public PFileDescriptorSetParent {
   friend class BackgroundParentImpl;
-  friend class mozilla::dom::nsIContentParent;
+  friend class mozilla::dom::ContentParent;
   friend class PFileDescriptorSetParent;
 
   nsTArray<FileDescriptor> mFileDescriptors;
 
  public:
   void ForgetFileDescriptors(nsTArray<FileDescriptor>& aFileDescriptors);
 
  private:
--- a/ipc/glue/IPCStreamParent.cpp
+++ b/ipc/glue/IPCStreamParent.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "IPCStreamDestination.h"
-#include "mozilla/dom/nsIContentParent.h"
+#include "mozilla/dom/ContentParent.h"
 #include "mozilla/ipc/PBackgroundParent.h"
 #include "mozilla/ipc/PChildToParentStreamParent.h"
 #include "mozilla/ipc/PParentToChildStreamParent.h"
 #include "mozilla/Unused.h"
 
 namespace mozilla {
 namespace ipc {
 
@@ -60,17 +60,17 @@ class IPCStreamSourceParent final : publ
  private:
   explicit IPCStreamSourceParent(nsIAsyncInputStream* aInputStream)
       : IPCStreamSource(aInputStream) {}
 };
 
 }  // anonymous namespace
 
 /* static */ PParentToChildStreamParent* IPCStreamSource::Create(
-    nsIAsyncInputStream* aInputStream, dom::nsIContentParent* aManager) {
+    nsIAsyncInputStream* aInputStream, dom::ContentParent* aManager) {
   MOZ_ASSERT(aInputStream);
   MOZ_ASSERT(aManager);
 
   // PContent can only be used on the main thread
   MOZ_ASSERT(NS_IsMainThread());
 
   IPCStreamSourceParent* source = IPCStreamSourceParent::Create(aInputStream);
   if (!source) {
--- a/ipc/glue/IPCStreamSource.h
+++ b/ipc/glue/IPCStreamSource.h
@@ -11,17 +11,17 @@
 #include "mozilla/dom/WorkerRef.h"
 
 class nsIAsyncInputStream;
 
 namespace mozilla {
 
 namespace dom {
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 }  // namespace dom
 
 namespace wr {
 struct ByteBuffer;
 }  // namespace wr
 
 namespace ipc {
 
@@ -68,17 +68,17 @@ class IPCStreamSource {
   // stream is blocking or if the Worker thread is already shutting down.
   static PChildToParentStreamChild* Create(nsIAsyncInputStream* aInputStream,
                                            PBackgroundChild* aManager);
 
   // Create a IPCStreamSource using a PContent IPC manager on the
   // main thread.  This can return nullptr if the provided stream is
   // blocking.
   static PParentToChildStreamParent* Create(nsIAsyncInputStream* aInputStream,
-                                            dom::nsIContentParent* aManager);
+                                            dom::ContentParent* aManager);
 
   // Create a IPCStreamSource using a PBackground IPC manager on the
   // main thread or a Worker thread.  This can return nullptr if the provided
   // stream is blocking or if the Worker thread is already shutting down.
   static PParentToChildStreamParent* Create(nsIAsyncInputStream* aInputStream,
                                             PBackgroundParent* aManager);
 
   static IPCStreamSource* Cast(PChildToParentStreamChild* aActor);
--- a/ipc/glue/IPCStreamUtils.cpp
+++ b/ipc/glue/IPCStreamUtils.cpp
@@ -368,17 +368,17 @@ bool AutoIPCStream::Serialize(nsIInputSt
                                  mDelayedStart)) {
     MOZ_CRASH("IPCStream creation failed!");
   }
 
   return true;
 }
 
 bool AutoIPCStream::Serialize(nsIInputStream* aStream,
-                              dom::nsIContentParent* aManager) {
+                              dom::ContentParent* aManager) {
   MOZ_ASSERT(aStream || !mValue);
   MOZ_ASSERT(aManager);
   MOZ_ASSERT(mValue || mOptionalValue);
   MOZ_ASSERT(!mTaken);
   MOZ_ASSERT(!IsSet());
 
   // If NormalizeOptionalValue returns false, we don't have to proceed.
   if (!NormalizeOptionalValue(aStream, mValue, mOptionalValue)) {
--- a/ipc/glue/IPCStreamUtils.h
+++ b/ipc/glue/IPCStreamUtils.h
@@ -10,17 +10,17 @@
 #include "mozilla/ipc/IPCStream.h"
 #include "nsCOMPtr.h"
 #include "nsIInputStream.h"
 
 namespace mozilla {
 
 namespace dom {
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 }  // namespace dom
 
 namespace ipc {
 
 class PBackgroundChild;
 class PBackgroundParent;
 
 // Deserialize an IPCStream received from an actor call.  These methods
@@ -152,17 +152,17 @@ class AutoIPCStream final {
 
   // Serialize the input stream or create a SendStream actor using the
   // PBackground manager.  If neither of these succeed, then crash.  This can
   // be called on the main thread or Worker threads.
   bool Serialize(nsIInputStream* aStream, PBackgroundChild* aManager);
 
   // Serialize the input stream.
   MOZ_MUST_USE bool Serialize(nsIInputStream* aStream,
-                              dom::nsIContentParent* aManager);
+                              dom::ContentParent* aManager);
 
   // Serialize the input stream.
   MOZ_MUST_USE bool Serialize(nsIInputStream* aStream,
                               PBackgroundParent* aManager);
 
   // Get the IPCStream as a non-optional value.  This will
   // assert if a stream has not been serialized or if it has already been taken.
   // This should only be called if the value is being, or has already been, sent
--- a/ipc/glue/InputStreamUtils.cpp
+++ b/ipc/glue/InputStreamUtils.cpp
@@ -131,17 +131,17 @@ void InputStreamHelper::SerializeInputSt
     uint32_t aMaxSize, uint32_t* aSizeUsed, PBackgroundChild* aManager) {
   SerializeInputStreamInternal(aInputStream, aParams, aFileDescriptors,
                                aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void InputStreamHelper::SerializeInputStream(
     nsIInputStream* aInputStream, InputStreamParams& aParams,
     nsTArray<FileDescriptor>& aFileDescriptors, bool aDelayedStart,
-    uint32_t aMaxSize, uint32_t* aSizeUsed, nsIContentParent* aManager) {
+    uint32_t aMaxSize, uint32_t* aSizeUsed, ContentParent* aManager) {
   SerializeInputStreamInternal(aInputStream, aParams, aFileDescriptors,
                                aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void InputStreamHelper::SerializeInputStream(
     nsIInputStream* aInputStream, InputStreamParams& aParams,
     nsTArray<FileDescriptor>& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed, PBackgroundParent* aManager) {
@@ -163,17 +163,17 @@ void InputStreamHelper::SerializeInputSt
                                                    PBackgroundChild* aManager) {
   SerializeInputStreamAsPipeInternal(aInputStream, aParams, aDelayedStart,
                                      aManager);
 }
 
 void InputStreamHelper::SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
                                                    InputStreamParams& aParams,
                                                    bool aDelayedStart,
-                                                   nsIContentParent* aManager) {
+                                                   ContentParent* aManager) {
   SerializeInputStreamAsPipeInternal(aInputStream, aParams, aDelayedStart,
                                      aManager);
 }
 
 void InputStreamHelper::SerializeInputStreamAsPipe(
     nsIInputStream* aInputStream, InputStreamParams& aParams,
     bool aDelayedStart, PBackgroundParent* aManager) {
   SerializeInputStreamAsPipeInternal(aInputStream, aParams, aDelayedStart,
--- a/ipc/glue/InputStreamUtils.h
+++ b/ipc/glue/InputStreamUtils.h
@@ -43,17 +43,17 @@ class InputStreamHelper {
                                    uint32_t* aSizeUsed,
                                    PBackgroundChild* aManager);
 
   static void SerializeInputStream(nsIInputStream* aInputStream,
                                    InputStreamParams& aParams,
                                    nsTArray<FileDescriptor>& aFileDescriptors,
                                    bool aDelayedStart, uint32_t aMaxSize,
                                    uint32_t* aSizeUsed,
-                                   mozilla::dom::nsIContentParent* aManager);
+                                   mozilla::dom::ContentParent* aManager);
 
   static void SerializeInputStream(nsIInputStream* aInputStream,
                                    InputStreamParams& aParams,
                                    nsTArray<FileDescriptor>& aFileDescriptors,
                                    bool aDelayedStart, uint32_t aMaxSize,
                                    uint32_t* aSizeUsed,
                                    PBackgroundParent* aManager);
 
@@ -65,17 +65,17 @@ class InputStreamHelper {
 
   static void SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
                                          InputStreamParams& aParams,
                                          bool aDelayedStart,
                                          PBackgroundChild* aManager);
 
   static void SerializeInputStreamAsPipe(
       nsIInputStream* aInputStream, InputStreamParams& aParams,
-      bool aDelayedStart, mozilla::dom::nsIContentParent* aManager);
+      bool aDelayedStart, mozilla::dom::ContentParent* aManager);
 
   static void SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
                                          InputStreamParams& aParams,
                                          bool aDelayedStart,
                                          PBackgroundParent* aManager);
 
   // After the sending of the inputStream into the IPC pipe, some of the
   // InputStreamParams data struct needs to be activated (IPCRemoteStream).
--- a/ipc/glue/nsIIPCSerializableInputStream.h
+++ b/ipc/glue/nsIIPCSerializableInputStream.h
@@ -12,17 +12,17 @@
 #include "nsISupports.h"
 #include "nsTArrayForwardDeclare.h"
 
 namespace mozilla {
 
 namespace dom {
 
 class nsIContentChild;
-class nsIContentParent;
+class ContentParent;
 
 }  // namespace dom
 
 namespace ipc {
 
 class FileDescriptor;
 class InputStreamParams;
 class PBackgroundChild;
@@ -56,17 +56,17 @@ class NS_NO_VTABLE nsIIPCSerializableInp
                          bool aDelayedStart, uint32_t aMaxSize,
                          uint32_t* aSizeUsed,
                          mozilla::ipc::PBackgroundChild* aManager) = 0;
 
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,
                          FileDescriptorArray& aFileDescriptors,
                          bool aDelayedStart, uint32_t aMaxSize,
                          uint32_t* aSizeUsed,
-                         mozilla::dom::nsIContentParent* aManager) = 0;
+                         mozilla::dom::ContentParent* aManager) = 0;
 
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,
                          FileDescriptorArray& aFileDescriptors,
                          bool aDelayedStart, uint32_t aMaxSize,
                          uint32_t* aSizeUsed,
                          mozilla::ipc::PBackgroundParent* aManager) = 0;
 
   virtual bool Deserialize(const mozilla::ipc::InputStreamParams& aParams,
@@ -82,17 +82,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSeri
                          mozilla::dom::nsIContentChild*) override;        \
                                                                           \
   virtual void Serialize(mozilla::ipc::InputStreamParams&,                \
                          FileDescriptorArray&, bool, uint32_t, uint32_t*, \
                          mozilla::ipc::PBackgroundChild*) override;       \
                                                                           \
   virtual void Serialize(mozilla::ipc::InputStreamParams&,                \
                          FileDescriptorArray&, bool, uint32_t, uint32_t*, \
-                         mozilla::dom::nsIContentParent*) override;       \
+                         mozilla::dom::ContentParent*) override;       \
                                                                           \
   virtual void Serialize(mozilla::ipc::InputStreamParams&,                \
                          FileDescriptorArray&, bool, uint32_t, uint32_t*, \
                          mozilla::ipc::PBackgroundParent*) override;      \
                                                                           \
   virtual bool Deserialize(const mozilla::ipc::InputStreamParams&,        \
                            const FileDescriptorArray&) override;
 
@@ -114,17 +114,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSeri
     _to Serialize(aParams, aFileDescriptors, aDelayedStart, aMaxSize,          \
                   aSizeUsed, aManager);                                        \
   }                                                                            \
                                                                                \
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,             \
                          FileDescriptorArray& aFileDescriptors,                \
                          bool aDelayedStart, uint32_t aMaxSize,                \
                          uint32_t* aSizeUsed,                                  \
-                         mozilla::dom::nsIContentParent* aManager) override {  \
+                         mozilla::dom::ContentParent* aManager) override {  \
     _to Serialize(aParams, aFileDescriptors, aDelayedStart, aMaxSize,          \
                   aSizeUsed, aManager);                                        \
   }                                                                            \
                                                                                \
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,             \
                          FileDescriptorArray& aFileDescriptors,                \
                          bool aDelayedStart, uint32_t aMaxSize,                \
                          uint32_t* aSizeUsed,                                  \
@@ -161,17 +161,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSeri
                      aSizeUsed, aManager);                                     \
     }                                                                          \
   }                                                                            \
                                                                                \
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,             \
                          FileDescriptorArray& aFileDescriptors,                \
                          bool aDelayedStart, uint32_t aMaxSize,                \
                          uint32_t* aSizeUsed,                                  \
-                         mozilla::dom::nsIContentParent* aManager) override {  \
+                         mozilla::dom::ContentParent* aManager) override {  \
     if (_to) {                                                                 \
       _to->Serialize(aParams, aFileDescriptors, aDelayedStart, aMaxSize,       \
                      aSizeUsed, aManager);                                     \
     }                                                                          \
   }                                                                            \
                                                                                \
   virtual void Serialize(mozilla::ipc::InputStreamParams& aParams,             \
                          FileDescriptorArray& aFileDescriptors,                \
--- a/netwerk/base/PartiallySeekableInputStream.cpp
+++ b/netwerk/base/PartiallySeekableInputStream.cpp
@@ -295,17 +295,17 @@ void PartiallySeekableInputStream::Seria
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void PartiallySeekableInputStream::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
-    mozilla::dom::nsIContentParent* aManager) {
+    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void PartiallySeekableInputStream::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
--- a/netwerk/base/nsBufferedStreams.cpp
+++ b/netwerk/base/nsBufferedStreams.cpp
@@ -605,17 +605,17 @@ void nsBufferedInputStream::Serialize(In
                                       PBackgroundChild* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsBufferedInputStream::Serialize(
     InputStreamParams& aParams, FileDescriptorArray& aFileDescriptors,
     bool aDelayedStart, uint32_t aMaxSize, uint32_t* aSizeUsed,
-    mozilla::dom::nsIContentParent* aManager) {
+    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsBufferedInputStream::Serialize(InputStreamParams& aParams,
                                       FileDescriptorArray& aFileDescriptors,
                                       bool aDelayedStart, uint32_t aMaxSize,
                                       uint32_t* aSizeUsed,
--- a/netwerk/base/nsFileStreams.cpp
+++ b/netwerk/base/nsFileStreams.cpp
@@ -556,17 +556,17 @@ void nsFileInputStream::Serialize(InputS
 
   SerializeInternal(aParams, aFileDescriptors);
 }
 
 void nsFileInputStream::Serialize(InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
                                   bool aDelayedStart, uint32_t aMaxSize,
                                   uint32_t* aSizeUsed,
-                                  mozilla::dom::nsIContentParent* aManager) {
+                                  mozilla::dom::ContentParent* aManager) {
   MOZ_ASSERT(aSizeUsed);
   *aSizeUsed = 0;
 
   SerializeInternal(aParams, aFileDescriptors);
 }
 
 void nsFileInputStream::Serialize(InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
--- a/netwerk/base/nsMIMEInputStream.cpp
+++ b/netwerk/base/nsMIMEInputStream.cpp
@@ -353,17 +353,17 @@ void nsMIMEInputStream::Serialize(InputS
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsMIMEInputStream::Serialize(InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
                                   bool aDelayedStart, uint32_t aMaxSize,
                                   uint32_t* aSizeUsed,
-                                  mozilla::dom::nsIContentParent* aManager) {
+                                  mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsMIMEInputStream::Serialize(InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
                                   bool aDelayedStart, uint32_t aMaxSize,
                                   uint32_t* aSizeUsed,
--- a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
+++ b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
@@ -136,19 +136,19 @@ already_AddRefed<ChannelWrapper> Channel
   }
 
   return wrapper.forget();
 }
 
 already_AddRefed<ChannelWrapper> ChannelWrapper::GetRegisteredChannel(
     const GlobalObject& global, uint64_t aChannelId,
     const WebExtensionPolicy& aAddon, nsITabParent* aTabParent) {
-  nsIContentParent* contentParent = nullptr;
+  ContentParent* contentParent = nullptr;
   if (TabParent* parent = static_cast<TabParent*>(aTabParent)) {
-    contentParent = static_cast<nsIContentParent*>(parent->Manager());
+    contentParent = parent->Manager();
   }
 
   auto& webreq = WebRequestService::GetSingleton();
 
   nsCOMPtr<nsITraceableChannel> channel =
       webreq.GetTraceableChannel(aChannelId, aAddon.Id(), contentParent);
   if (!channel) {
     return nullptr;
@@ -672,23 +672,22 @@ void ChannelWrapper::RegisterTraceableCh
   mAddonEntries.Put(aAddon.Id(), aTabParent);
   if (!mChannelEntry) {
     mChannelEntry = WebRequestService::GetSingleton().RegisterChannel(this);
     CheckEventListeners();
   }
 }
 
 already_AddRefed<nsITraceableChannel> ChannelWrapper::GetTraceableChannel(
-    nsAtom* aAddonId, dom::nsIContentParent* aContentParent) const {
+    nsAtom* aAddonId, dom::ContentParent* aContentParent) const {
   nsCOMPtr<nsITabParent> tabParent;
   if (mAddonEntries.Get(aAddonId, getter_AddRefs(tabParent))) {
-    nsIContentParent* contentParent = nullptr;
+    ContentParent* contentParent = nullptr;
     if (tabParent) {
-      contentParent = static_cast<nsIContentParent*>(
-          static_cast<TabParent*>(tabParent.get())->Manager());
+      contentParent = static_cast<TabParent*>(tabParent.get())->Manager();
     }
 
     if (contentParent == aContentParent) {
       nsCOMPtr<nsITraceableChannel> chan = QueryChannel();
       return chan.forget();
     }
   }
   return nullptr;
--- a/toolkit/components/extensions/webrequest/ChannelWrapper.h
+++ b/toolkit/components/extensions/webrequest/ChannelWrapper.h
@@ -40,17 +40,17 @@
     }                                                \
   }
 
 class nsILoadContext;
 class nsITraceableChannel;
 
 namespace mozilla {
 namespace dom {
-class nsIContentParent;
+class ContentParent;
 class Element;
 }  // namespace dom
 namespace extensions {
 
 namespace detail {
 
 // We need to store our wrapped channel as a weak reference, since channels
 // are not cycle collected, and we're going to be hanging this wrapper
@@ -146,17 +146,17 @@ class ChannelWrapper final : public DOME
 
   void GetContentType(nsCString& aContentType) const;
   void SetContentType(const nsACString& aContentType);
 
   void RegisterTraceableChannel(const WebExtensionPolicy& aAddon,
                                 nsITabParent* aTabParent);
 
   already_AddRefed<nsITraceableChannel> GetTraceableChannel(
-      nsAtom* aAddonId, dom::nsIContentParent* aContentParent) const;
+      nsAtom* aAddonId, dom::ContentParent* aContentParent) const;
 
   void GetMethod(nsCString& aRetVal) const;
 
   dom::MozContentPolicyType Type() const;
 
   uint32_t StatusCode() const;
 
   void GetStatusLine(nsCString& aRetVal) const;
--- a/toolkit/components/extensions/webrequest/WebRequestService.cpp
+++ b/toolkit/components/extensions/webrequest/WebRequestService.cpp
@@ -39,17 +39,17 @@ UniquePtr<WebRequestChannelEntry> WebReq
   auto key = mChannelEntries.LookupForAdd(entry->mChannelId);
   MOZ_DIAGNOSTIC_ASSERT(!key);
   key.OrInsert([&entry]() { return entry.get(); });
 
   return entry;
 }
 
 already_AddRefed<nsITraceableChannel> WebRequestService::GetTraceableChannel(
-    uint64_t aChannelId, nsAtom* aAddonId, nsIContentParent* aContentParent) {
+    uint64_t aChannelId, nsAtom* aAddonId, ContentParent* aContentParent) {
   if (auto entry = mChannelEntries.Get(aChannelId)) {
     if (entry->mChannel) {
       return entry->mChannel->GetTraceableChannel(aAddonId, aContentParent);
     }
   }
   return nullptr;
 }
 
--- a/toolkit/components/extensions/webrequest/WebRequestService.h
+++ b/toolkit/components/extensions/webrequest/WebRequestService.h
@@ -18,17 +18,17 @@
 
 class nsAtom;
 class nsITabParent;
 class nsITraceableChannel;
 
 namespace mozilla {
 namespace dom {
 class TabParent;
-class nsIContentParent;
+class ContentParent;
 }  // namespace dom
 
 namespace extensions {
 
 class WebRequestChannelEntry final {
  public:
   ~WebRequestChannelEntry();
 
@@ -56,17 +56,17 @@ class WebRequestService final {
   using ChannelEntry = WebRequestChannelEntry;
 
   UniquePtr<ChannelEntry> RegisterChannel(ChannelWrapper* aChannel);
 
   void UnregisterTraceableChannel(uint64_t aChannelId);
 
   already_AddRefed<nsITraceableChannel> GetTraceableChannel(
       uint64_t aChannelId, nsAtom* aAddonId,
-      dom::nsIContentParent* aContentParent);
+      dom::ContentParent* aContentParent);
 
  private:
   ~WebRequestService();
 
   friend ChannelEntry;
 
   nsDataHashtable<nsUint64HashKey, ChannelEntry*> mChannelEntries;
 };
--- a/xpcom/io/InputStreamLengthWrapper.cpp
+++ b/xpcom/io/InputStreamLengthWrapper.cpp
@@ -273,17 +273,17 @@ void InputStreamLengthWrapper::Serialize
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void InputStreamLengthWrapper::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
-    mozilla::dom::nsIContentParent* aManager) {
+    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void InputStreamLengthWrapper::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
--- a/xpcom/io/NonBlockingAsyncInputStream.cpp
+++ b/xpcom/io/NonBlockingAsyncInputStream.cpp
@@ -333,17 +333,17 @@ void NonBlockingAsyncInputStream::Serial
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void NonBlockingAsyncInputStream::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
-    mozilla::dom::nsIContentParent* aManager) {
+    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void NonBlockingAsyncInputStream::Serialize(
     mozilla::ipc::InputStreamParams& aParams,
     FileDescriptorArray& aFileDescriptors, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
--- a/xpcom/io/SlicedInputStream.cpp
+++ b/xpcom/io/SlicedInputStream.cpp
@@ -437,17 +437,17 @@ void SlicedInputStream::Serialize(mozill
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void SlicedInputStream::Serialize(mozilla::ipc::InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
                                   bool aDelayedStart, uint32_t aMaxSize,
                                   uint32_t* aSizeUsed,
-                                  mozilla::dom::nsIContentParent* aManager) {
+                                  mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void SlicedInputStream::Serialize(mozilla::ipc::InputStreamParams& aParams,
                                   FileDescriptorArray& aFileDescriptors,
                                   bool aDelayedStart, uint32_t aMaxSize,
                                   uint32_t* aSizeUsed,
--- a/xpcom/io/nsMultiplexInputStream.cpp
+++ b/xpcom/io/nsMultiplexInputStream.cpp
@@ -1005,17 +1005,17 @@ void nsMultiplexInputStream::Serialize(I
                                        PBackgroundChild* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsMultiplexInputStream::Serialize(
     InputStreamParams& aParams, FileDescriptorArray& aFileDescriptors,
     bool aDelayedStart, uint32_t aMaxSize, uint32_t* aSizeUsed,
-    mozilla::dom::nsIContentParent* aManager) {
+    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize,
                     aSizeUsed, aManager);
 }
 
 void nsMultiplexInputStream::Serialize(InputStreamParams& aParams,
                                        FileDescriptorArray& aFileDescriptors,
                                        bool aDelayedStart, uint32_t aMaxSize,
                                        uint32_t* aSizeUsed,
--- a/xpcom/io/nsStorageStream.cpp
+++ b/xpcom/io/nsStorageStream.cpp
@@ -562,17 +562,17 @@ void nsStorageInputStream::Serialize(Inp
                                      uint32_t aMaxSize, uint32_t* aSizeUsed,
                                      mozilla::ipc::PBackgroundChild* aManager) {
   SerializeInternal(aParams, aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void nsStorageInputStream::Serialize(InputStreamParams& aParams,
                                      FileDescriptorArray&, bool aDelayedStart,
                                      uint32_t aMaxSize, uint32_t* aSizeUsed,
-                                     mozilla::dom::nsIContentParent* aManager) {
+                                     mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void nsStorageInputStream::Serialize(
     InputStreamParams& aParams, FileDescriptorArray&, bool aDelayedStart,
     uint32_t aMaxSize, uint32_t* aSizeUsed,
     mozilla::ipc::PBackgroundParent* aManager) {
   SerializeInternal(aParams, aDelayedStart, aMaxSize, aSizeUsed, aManager);
--- a/xpcom/io/nsStringStream.cpp
+++ b/xpcom/io/nsStringStream.cpp
@@ -359,17 +359,17 @@ void nsStringInputStream::Serialize(Inpu
                                     PBackgroundChild* aManager) {
   SerializeInternal(aParams, aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void nsStringInputStream::Serialize(InputStreamParams& aParams,
                                     FileDescriptorArray& /* aFDs */,
                                     bool aDelayedStart, uint32_t aMaxSize,
                                     uint32_t* aSizeUsed,
-                                    mozilla::dom::nsIContentParent* aManager) {
+                                    mozilla::dom::ContentParent* aManager) {
   SerializeInternal(aParams, aDelayedStart, aMaxSize, aSizeUsed, aManager);
 }
 
 void nsStringInputStream::Serialize(InputStreamParams& aParams,
                                     FileDescriptorArray& /* aFDs */,
                                     bool aDelayedStart, uint32_t aMaxSize,
                                     uint32_t* aSizeUsed,
                                     PBackgroundParent* aManager) {
--- a/xpcom/tests/gtest/TestNonBlockingAsyncInputStream.cpp
+++ b/xpcom/tests/gtest/TestNonBlockingAsyncInputStream.cpp
@@ -271,17 +271,17 @@ class QIInputStream final : public nsIIn
   void Serialize(mozilla::ipc::InputStreamParams&, FileDescriptorArray&, bool,
                  uint32_t, uint32_t*, mozilla::dom::nsIContentChild*) override {
   }
   void Serialize(mozilla::ipc::InputStreamParams&, FileDescriptorArray&, bool,
                  uint32_t, uint32_t*,
                  mozilla::ipc::PBackgroundChild*) override {}
   void Serialize(mozilla::ipc::InputStreamParams&, FileDescriptorArray&, bool,
                  uint32_t, uint32_t*,
-                 mozilla::dom::nsIContentParent*) override {}
+                 mozilla::dom::ContentParent*) override {}
   void Serialize(mozilla::ipc::InputStreamParams&, FileDescriptorArray&, bool,
                  uint32_t, uint32_t*,
                  mozilla::ipc::PBackgroundParent*) override {}
   bool Deserialize(const mozilla::ipc::InputStreamParams&,
                    const FileDescriptorArray&) override {
     return false;
   }