Backed out 10 changesets (bug 1513057) for build bustages on a CLOSED TREE
authorAndreea Pavel <apavel@mozilla.com>
Fri, 11 Jan 2019 17:02:44 +0200
changeset 510583 3f76ed638d83ade10f10cfecd2919936335a4aea
parent 510582 56329b5f1844a1d127bf877351be82006ecdee5b
child 510584 0c9623b98c22811b1f207406cdf6897e4aeed54c
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1513057
milestone66.0a1
backs out56329b5f1844a1d127bf877351be82006ecdee5b
46411c5de3dade8d056fe33b745ee0e4eb7c38f9
de65c456aad6dbd598f81138509c342152ae4047
f648b5f1a7c2333e10ae9f7d9a91314de4512a70
460bbf0849e11fea35612feed9d10201e1fe5213
86032a14d26fc5be8c6802ec915db14e1a371b6c
a81f83df08d50ced7d669958f9a06f52b087a5fc
edbda5ee5fd53f9ba0ab75477f08c7b29088eca1
c900ac2519f5007a28b201bbc00a95873ac38f9c
4e94bbb9031517d9953adc24b6ff5646600df028
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 10 changesets (bug 1513057) for build bustages on a CLOSED TREE Backed out changeset 56329b5f1844 (bug 1513057) Backed out changeset 46411c5de3da (bug 1513057) Backed out changeset de65c456aad6 (bug 1513057) Backed out changeset f648b5f1a7c2 (bug 1513057) Backed out changeset 460bbf0849e1 (bug 1513057) Backed out changeset 86032a14d26f (bug 1513057) Backed out changeset a81f83df08d5 (bug 1513057) Backed out changeset edbda5ee5fd5 (bug 1513057) Backed out changeset c900ac2519f5 (bug 1513057) Backed out changeset 4e94bbb90315 (bug 1513057)
docshell/base/timeline/TimelineConsumers.cpp
dom/ipc/ContentParent.cpp
dom/ipc/ContentProcess.cpp
dom/ipc/PContent.ipdl
dom/ipc/PrefsTypes.ipdlh
dom/ipc/moz.build
ipc/glue/BackgroundChild.h
ipc/glue/BackgroundImpl.cpp
ipc/glue/BackgroundParent.h
ipc/glue/BackgroundParentImpl.cpp
ipc/glue/CrashReporterHost.cpp
ipc/glue/GeckoChildProcessHost.cpp
ipc/glue/ProcessUtils.h
ipc/glue/ProcessUtils_common.cpp
ipc/glue/moz.build
modules/libpref/init/all.js
netwerk/base/nsIOService.cpp
netwerk/base/nsIOService.h
netwerk/ipc/NeckoCommon.h
netwerk/ipc/NeckoParent.cpp
netwerk/ipc/NeckoParent.h
netwerk/ipc/PNecko.ipdl
netwerk/ipc/PSocketProcess.ipdl
netwerk/ipc/PSocketProcessBridge.ipdl
netwerk/ipc/SocketProcessBridgeChild.cpp
netwerk/ipc/SocketProcessBridgeChild.h
netwerk/ipc/SocketProcessBridgeParent.cpp
netwerk/ipc/SocketProcessBridgeParent.h
netwerk/ipc/SocketProcessChild.cpp
netwerk/ipc/SocketProcessChild.h
netwerk/ipc/SocketProcessHost.cpp
netwerk/ipc/SocketProcessHost.h
netwerk/ipc/SocketProcessImpl.cpp
netwerk/ipc/SocketProcessImpl.h
netwerk/ipc/SocketProcessLogging.h
netwerk/ipc/SocketProcessParent.cpp
netwerk/ipc/SocketProcessParent.h
netwerk/ipc/moz.build
netwerk/protocol/http/nsHttpHandler.cpp
toolkit/components/crashes/CrashManager.jsm
toolkit/components/crashes/CrashService.js
toolkit/components/crashes/nsICrashService.idl
toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
toolkit/components/crashes/tests/xpcshell/test_crash_store.js
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/Processes.yaml
toolkit/components/telemetry/Scalars.yaml
toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
toolkit/components/telemetry/core/Telemetry.cpp
toolkit/components/telemetry/core/TelemetryCommon.h
toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
toolkit/components/telemetry/pings/TelemetrySession.jsm
toolkit/components/telemetry/tests/python/test_histogramtools_strict.py
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsEmbedFunctions.cpp
xpcom/base/moz.build
xpcom/base/nsMemoryReporterManager.cpp
xpcom/build/GeckoProcessTypes.h
xpcom/build/nsXULAppAPI.h
xpcom/system/nsIXULRuntime.idl
--- a/docshell/base/timeline/TimelineConsumers.cpp
+++ b/docshell/base/timeline/TimelineConsumers.cpp
@@ -29,20 +29,17 @@ StaticRefPtr<TimelineConsumers> Timeline
 // in these cases.
 bool TimelineConsumers::sInShutdown = false;
 
 already_AddRefed<TimelineConsumers> TimelineConsumers::Get() {
   // Using this class is not supported yet for other processes other than
   // parent or content. To avoid accidental checks to methods like `IsEmpty`,
   // which would probably always be true in those cases, assert here.
   // Remember, there will be different singletons available to each process.
-
-  // TODO: we have to avoid calling this function in socket process.
-  MOZ_ASSERT(XRE_IsContentProcess() || XRE_IsParentProcess() ||
-             XRE_IsSocketProcess());
+  MOZ_ASSERT(XRE_IsContentProcess() || XRE_IsParentProcess());
 
   // If we are shutting down, don't bother doing anything. Note: we can only
   // know whether or not we're in shutdown if we're instantiated.
   if (sInShutdown) {
     return nullptr;
   }
 
   // Note: We don't simply check `sInstance` for null-ness here, since otherwise
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/DebugOnly.h"
 
 #include "base/basictypes.h"
 #include "base/shared_memory.h"
 
 #include "ContentParent.h"
-#include "ProcessUtils.h"
 #include "TabParent.h"
 
 #if defined(ANDROID) || defined(LINUX)
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
 
 #include "chrome/common/process_watcher.h"
@@ -2107,65 +2106,82 @@ void ContentParent::LaunchSubprocessInte
   char idStr[21];
   SprintfLiteral(idStr, "%" PRId64, static_cast<uint64_t>(mChildID));
   extraArgs.push_back(idStr);
   extraArgs.push_back(IsForBrowser() ? "-isForBrowser" : "-notForBrowser");
 
   // Prefs information is passed via anonymous shared memory to avoid bloating
   // the command line.
 
-  SharedPreferenceSerializer prefSerializer;
-  if (!prefSerializer.SerializeToSharedMemory()) {
+  size_t prefMapSize;
+  auto prefMapHandle =
+      Preferences::EnsureSnapshot(&prefMapSize).ClonePlatformHandle();
+
+  // Serialize the early prefs.
+  nsAutoCStringN<1024> prefs;
+  Preferences::SerializePreferences(prefs);
+
+  // Set up the shared memory.
+  base::SharedMemory shm;
+  if (!shm.Create(prefs.Length())) {
+    NS_ERROR("failed to create shared memory in the parent");
     MarkAsDead();
     earlyReject();
     return;
   }
+  if (!shm.Map(prefs.Length())) {
+    NS_ERROR("failed to map shared memory in the parent");
+    MarkAsDead();
+    earlyReject();
+    return;
+  }
+
+  // Copy the serialized prefs into the shared memory.
+  memcpy(static_cast<char*>(shm.memory()), prefs.get(), prefs.Length());
 
   // Register ContentParent as an observer for changes to any pref
   // whose prefix matches the empty string, i.e. all of them.  The
   // observation starts here in order to capture pref updates that
   // happen during async launch.
   Preferences::AddStrongObserver(this, "");
 
   // Formats a pointer or pointer-sized-integer as a string suitable for passing
   // in an arguments list.
   auto formatPtrArg = [](auto arg) {
     return nsPrintfCString("%zu", uintptr_t(arg));
   };
 
 #if defined(XP_WIN)
   // Record the handle as to-be-shared, and pass it via a command flag. This
   // works because Windows handles are system-wide.
-  HANDLE prefsHandle = prefSerializer.GetSharedMemoryHandle();
+  HANDLE prefsHandle = shm.handle();
   mSubprocess->AddHandleToShare(prefsHandle);
-  mSubprocess->AddHandleToShare(prefSerializer.GetPrefMapHandle().get());
+  mSubprocess->AddHandleToShare(prefMapHandle.get());
   extraArgs.push_back("-prefsHandle");
   extraArgs.push_back(formatPtrArg(prefsHandle).get());
   extraArgs.push_back("-prefMapHandle");
-  extraArgs.push_back(
-      formatPtrArg(prefSerializer.GetPrefMapHandle().get()).get());
+  extraArgs.push_back(formatPtrArg(prefMapHandle.get()).get());
 #else
   // In contrast, Unix fds are per-process. So remap the fd to a fixed one that
   // will be used in the child.
   // XXX: bug 1440207 is about improving how fixed fds are used.
   //
   // Note: on Android, AddFdToRemap() sets up the fd to be passed via a Parcel,
   // and the fixed fd isn't used. However, we still need to mark it for
   // remapping so it doesn't get closed in the child.
-  mSubprocess->AddFdToRemap(prefSerializer.GetSharedMemoryHandle().fd,
-                            kPrefsFileDescriptor);
-  mSubprocess->AddFdToRemap(prefSerializer.GetPrefMapHandle().get(),
-                            kPrefMapFileDescriptor);
+  mSubprocess->AddFdToRemap(shm.handle().fd, kPrefsFileDescriptor);
+  mSubprocess->AddFdToRemap(prefMapHandle.get(), kPrefMapFileDescriptor);
 #endif
 
   // Pass the lengths via command line flags.
   extraArgs.push_back("-prefsLen");
-  extraArgs.push_back(formatPtrArg(prefSerializer.GetPrefLength()).get());
+  extraArgs.push_back(formatPtrArg(prefs.Length()).get());
+
   extraArgs.push_back("-prefMapSize");
-  extraArgs.push_back(formatPtrArg(prefSerializer.GetPrefMapSize()).get());
+  extraArgs.push_back(formatPtrArg(prefMapSize).get());
 
   // Scheduler prefs need to be handled differently because the scheduler needs
   // to start up in the content process before the normal preferences service.
   nsPrintfCString schedulerPrefs = Scheduler::GetPrefs();
   extraArgs.push_back("-schedulerPrefs");
   extraArgs.push_back(schedulerPrefs.get());
 
   if (gSafeMode) {
@@ -2215,18 +2231,19 @@ void ContentParent::LaunchSubprocessInte
   // ContentParent then owns the GeckoChildProcessHost (and that
   // ownership is not exposed to the cycle collector).  Therefore,
   // this all stays alive until the promise is resolved or rejected.
 
   auto resolve = [self, this, aInitialPriority, isSync,
                   // Transfer ownership of RAII file descriptor/handle
                   // holders so that they won't be closed before the
                   // child can inherit them.
-                  prefSerializer =
-                      std::move(prefSerializer)](base::ProcessHandle handle) {
+                  shm = std::move(shm),
+                  prefMapHandle =
+                      std::move(prefMapHandle)](base::ProcessHandle handle) {
     AUTO_PROFILER_LABEL("ContentParent::LaunchSubprocess::resolve", OTHER);
     const auto launchResumeTS = TimeStamp::Now();
 
     base::ProcessId procId = base::GetProcId(handle);
     Open(mSubprocess->GetChannel(), procId);
 #ifdef MOZ_CODE_COVERAGE
     Unused << SendShareCodeCoverageMutex(
         CodeCoverageHandler::Get()->GetMutexHandle(procId));
--- a/dom/ipc/ContentProcess.cpp
+++ b/dom/ipc/ContentProcess.cpp
@@ -73,29 +73,52 @@ static void SetUpSandboxEnvironment() {
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 
   SetTmpEnvironmentVariable(sandboxedContentTemp);
 }
 #endif
 
+#ifdef ANDROID
+static int gPrefsFd = -1;
+static int gPrefMapFd = -1;
+
+void SetPrefsFd(int aFd) { gPrefsFd = aFd; }
+
+void SetPrefMapFd(int aFd) { gPrefMapFd = aFd; }
+#endif
+
 bool ContentProcess::Init(int aArgc, char* aArgv[]) {
   Maybe<uint64_t> childID;
   Maybe<bool> isForBrowser;
+  Maybe<base::SharedMemoryHandle> prefsHandle;
+  Maybe<FileDescriptor> prefMapHandle;
+  Maybe<size_t> prefsLen;
+  Maybe<size_t> prefMapSize;
   Maybe<const char*> schedulerPrefs;
   Maybe<const char*> parentBuildID;
-  char* prefsHandle = nullptr;
-  char* prefMapHandle = nullptr;
-  char* prefsLen = nullptr;
-  char* prefMapSize = nullptr;
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
   nsCOMPtr<nsIFile> profileDir;
 #endif
 
+  // Parses an arg containing a pointer-sized-integer.
+  auto parseUIntPtrArg = [](char*& aArg) {
+    // ContentParent uses %zu to print a word-sized unsigned integer. So
+    // even though strtoull() returns a long long int, it will fit in a
+    // uintptr_t.
+    return uintptr_t(strtoull(aArg, &aArg, 10));
+  };
+
+#ifdef XP_WIN
+  auto parseHandleArg = [&](char*& aArg) {
+    return HANDLE(parseUIntPtrArg(aArg));
+  };
+#endif
+
   for (int i = 1; i < aArgc; i++) {
     if (!aArgv[i]) {
       continue;
     }
 
     if (strcmp(aArgv[i], "-appdir") == 0) {
       if (++i == aArgc) {
         return false;
@@ -119,34 +142,57 @@ bool ContentProcess::Init(int aArgc, cha
     } else if (strcmp(aArgv[i], "-notForBrowser") == 0) {
       isForBrowser = Some(false);
 
 #ifdef XP_WIN
     } else if (strcmp(aArgv[i], "-prefsHandle") == 0) {
       if (++i == aArgc) {
         return false;
       }
-      prefsHandle = aArgv[i];
+      char* str = aArgv[i];
+      prefsHandle = Some(parseHandleArg(str));
+      if (str[0] != '\0') {
+        return false;
+      }
+
     } else if (strcmp(aArgv[i], "-prefMapHandle") == 0) {
       if (++i == aArgc) {
         return false;
       }
-      prefMapHandle = aArgv[i];
+      char* str = aArgv[i];
+      // The FileDescriptor constructor will clone this handle when constructed,
+      // so store it in a UniquePlatformHandle to make sure the original gets
+      // closed.
+      FileDescriptor::UniquePlatformHandle handle(parseHandleArg(str));
+      prefMapHandle.emplace(handle.get());
+      if (str[0] != '\0') {
+        return false;
+      }
 #endif
 
     } else if (strcmp(aArgv[i], "-prefsLen") == 0) {
       if (++i == aArgc) {
         return false;
       }
-      prefsLen = aArgv[i];
+      char* str = aArgv[i];
+      prefsLen = Some(parseUIntPtrArg(str));
+      if (str[0] != '\0') {
+        return false;
+      }
+
     } else if (strcmp(aArgv[i], "-prefMapSize") == 0) {
       if (++i == aArgc) {
         return false;
       }
-      prefMapSize = aArgv[i];
+      char* str = aArgv[i];
+      prefMapSize = Some(parseUIntPtrArg(str));
+      if (str[0] != '\0') {
+        return false;
+      }
+
     } else if (strcmp(aArgv[i], "-schedulerPrefs") == 0) {
       if (++i == aArgc) {
         return false;
       }
       schedulerPrefs = Some(aArgv[i]);
 
     } else if (strcmp(aArgv[i], "-safeMode") == 0) {
       gSafeMode = true;
@@ -167,34 +213,64 @@ bool ContentProcess::Init(int aArgc, cha
       if (NS_FAILED(rv) || NS_FAILED(profileDir->Exists(&flag)) || !flag) {
         NS_WARNING("Invalid profile directory passed to content process.");
         profileDir = nullptr;
       }
 #endif /* XP_MACOSX && MOZ_CONTENT_SANDBOX */
     }
   }
 
+#ifdef ANDROID
+  // Android is different; get the FD via gPrefsFd instead of a fixed fd.
+  MOZ_RELEASE_ASSERT(gPrefsFd != -1);
+  prefsHandle = Some(base::FileDescriptor(gPrefsFd, /* auto_close */ true));
+
+  FileDescriptor::UniquePlatformHandle handle(gPrefMapFd);
+  prefMapHandle.emplace(handle.get());
+#elif XP_UNIX
+  prefsHandle = Some(base::FileDescriptor(kPrefsFileDescriptor,
+                                          /* auto_close */ true));
+
+  // The FileDescriptor constructor will clone this handle when constructed,
+  // so store it in a UniquePlatformHandle to make sure the original gets
+  // closed.
+  FileDescriptor::UniquePlatformHandle handle(kPrefMapFileDescriptor);
+  prefMapHandle.emplace(handle.get());
+#endif
+
   // Did we find all the mandatory flags?
   if (childID.isNothing() || isForBrowser.isNothing() ||
+      prefsHandle.isNothing() || prefsLen.isNothing() ||
+      prefMapHandle.isNothing() || prefMapSize.isNothing() ||
       schedulerPrefs.isNothing() || parentBuildID.isNothing()) {
     return false;
   }
 
-  SharedPreferenceDeserializer deserializer;
-  if (!deserializer.DeserializeFromSharedMemory(prefsHandle, prefMapHandle,
-                                                prefsLen, prefMapSize)) {
+  // Init the shared-memory base preference mapping first, so that only changed
+  // preferences wind up in heap memory.
+  Preferences::InitSnapshot(prefMapHandle.ref(), *prefMapSize);
+
+  // Set up early prefs from the shared memory.
+  base::SharedMemory shm;
+  if (!shm.SetHandle(*prefsHandle, /* read_only */ true)) {
+    NS_ERROR("failed to open shared memory in the child");
     return false;
   }
+  if (!shm.Map(*prefsLen)) {
+    NS_ERROR("failed to map shared memory in the child");
+    return false;
+  }
+  Preferences::DeserializePreferences(static_cast<char*>(shm.memory()),
+                                      *prefsLen);
 
   Scheduler::SetPrefs(*schedulerPrefs);
 
   if (recordreplay::IsMiddleman()) {
     recordreplay::parent::InitializeMiddleman(aArgc, aArgv, ParentPid(),
-                                              deserializer.GetPrefsHandle(),
-                                              deserializer.GetPrefMapHandle());
+                                              *prefsHandle, *prefMapHandle);
   }
 
   mContent.Init(IOThreadChild::message_loop(), ParentPid(), *parentBuildID,
                 IOThreadChild::channel(), *childID, *isForBrowser);
 
   mXREEmbed.Start();
 #if (defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
   mContent.SetProfileDir(profileDir);
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -55,32 +55,32 @@ include PluginTypes;
 include ProtocolTypes;
 include PBackgroundSharedTypes;
 include PContentPermission;
 include ServiceWorkerConfiguration;
 include GraphicsMessages;
 include MemoryReportTypes;
 include ClientIPCTypes;
 include HangTypes;
-include PrefsTypes;
 
 // Workaround to prevent error if PContentChild.cpp & PContentBridgeParent.cpp
 // are put into different UnifiedProtocolsXX.cpp files.
 // XXX Remove this once bug 1069073 is fixed
 include "mozilla/dom/PContentBridgeParent.h";
 
 using refcounted class nsIDOMGeoPosition from "nsGeoPositionIPCSerialiser.h";
 using refcounted class nsIAlertNotification from "mozilla/AlertNotificationIPCSerializer.h";
 
 using struct ChromePackage from "mozilla/chrome/RegistryMessageUtils.h";
 using struct SubstitutionMapping from "mozilla/chrome/RegistryMessageUtils.h";
 using struct OverrideMapping from "mozilla/chrome/RegistryMessageUtils.h";
 using base::ProcessId from "base/process.h";
 using struct IPC::Permission from "mozilla/net/NeckoMessageUtils.h";
 using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
+using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
 using mozilla::a11y::IHandlerControlHolder from "mozilla/a11y/IPCTypes.h";
 using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
 using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
 using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
 using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
 using mozilla::LayoutDeviceIntPoint from "Units.h";
 using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h";
@@ -141,16 +141,40 @@ struct FontPatternListEntry {
 
 // Wrap the Font*ListEntry records in a union so the SetXPCOMProcessAttributes
 // message can pass an array of either type.
 union SystemFontListEntry {
     FontFamilyListEntry;
     FontPatternListEntry;
 };
 
+union PrefValue {
+  nsCString;
+  int32_t;
+  bool;
+};
+
+union MaybePrefValue {
+  PrefValue;
+  null_t;
+};
+
+// This serialization form mirrors that used in mozilla::Pref in
+// Preferences.cpp. The two should be kept in sync, e.g. if something is added
+// to one it should also be added to the other.
+//
+// Note: there is no need to pass the isSticky attribute because that's an
+// immutable attribute obtained from file at startup.
+struct Pref {
+  nsCString name;
+  bool isLocked;
+  MaybePrefValue defaultValue;
+  MaybePrefValue userValue;
+};
+
 struct DataStorageItem {
   nsCString key;
   nsCString value;
   DataStorageType type;
 };
 
 struct DataStorageEntry {
   DataStorageItem[] items;
deleted file mode 100644
--- a/dom/ipc/PrefsTypes.ipdlh
+++ /dev/null
@@ -1,36 +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/. */
-
-using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
-
-namespace mozilla {
-namespace dom {
-
-union PrefValue {
-  nsCString;
-  int32_t;
-  bool;
-};
-
-union MaybePrefValue {
-  PrefValue;
-  null_t;
-};
-
-// This serialization form mirrors that used in mozilla::Pref in
-// Preferences.cpp. The two should be kept in sync, e.g. if something is added
-// to one it should also be added to the other.
-//
-// Note: there is no need to pass the isSticky attribute because that's an
-// immutable attribute obtained from file at startup.
-struct Pref {
-  nsCString name;
-  bool isLocked;
-  MaybePrefValue defaultValue;
-  MaybePrefValue userValue;
-};
-
-} // namespace dom
-} // namespace mozilla
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -110,17 +110,16 @@ IPDL_SOURCES += [
     'PContentBridge.ipdl',
     'PContentPermission.ipdlh',
     'PContentPermissionRequest.ipdl',
     'PCycleCollectWithLogs.ipdl',
     'PFilePicker.ipdl',
     'PLoginReputation.ipdl',
     'PPluginWidget.ipdl',
     'PProcessHangMonitor.ipdl',
-    'PrefsTypes.ipdlh',
     'PTabContext.ipdlh',
     'PURLClassifier.ipdl',
     'PURLClassifierInfo.ipdlh',
     'PURLClassifierLocal.ipdl',
     'PWindowGlobal.ipdl',
     'ServiceWorkerConfiguration.ipdlh',
 ]
 
--- a/ipc/glue/BackgroundChild.h
+++ b/ipc/glue/BackgroundChild.h
@@ -16,70 +16,55 @@ namespace mozilla {
 namespace dom {
 
 class BlobImpl;
 class ContentChild;
 class ContentParent;
 
 }  // namespace dom
 
-namespace net {
-
-class SocketProcessImpl;
-
-}  // namespace net
-
 namespace ipc {
 
 class PBackgroundChild;
 
 // This class allows access to the PBackground protocol. PBackground allows
 // communication between any thread (in the parent or a child process) and a
 // single background thread in the parent process. Each PBackgroundChild
 // instance is tied to the thread on which it is created and must not be shared
 // across threads. Each PBackgroundChild is unique and valid as long as its
 // designated thread lives.
 //
 // Creation of PBackground is synchronous. GetOrCreateForCurrentThread will
 // create the actor if it doesn't exist yet. Thereafter (assuming success)
 // GetForCurrentThread() will return the same actor every time.
 //
-// GetOrCreateSocketActorForCurrentThread, which is like
-// GetOrCreateForCurrentThread, is used to get or create PBackground actor
-// between child process and socket process.
-//
 // CloseForCurrentThread() will close the current PBackground actor.  Subsequent
 // calls to GetForCurrentThread will return null.  CloseForCurrentThread() may
 // only be called exactly once for each thread-specific actor.  Currently it is
 // illegal to call this before the PBackground actor has been created.
 //
 // The PBackgroundChild actor and all its sub-protocol actors will be
 // automatically destroyed when its designated thread completes.
 class BackgroundChild final {
   friend class mozilla::dom::ContentChild;
   friend class mozilla::dom::ContentParent;
-  friend class mozilla::net::SocketProcessImpl;
 
   typedef mozilla::ipc::Transport Transport;
 
  public:
   // See above.
   static PBackgroundChild* GetForCurrentThread();
 
   // See above.
   static PBackgroundChild* GetOrCreateForCurrentThread(
       nsIEventTarget* aMainEventTarget = nullptr);
 
   // See above.
   static void CloseForCurrentThread();
 
-  // See above.
-  static PBackgroundChild* GetOrCreateSocketActorForCurrentThread(
-      nsIEventTarget* aMainEventTarget = nullptr);
-
  private:
   // Only called by ContentChild or ContentParent.
   static void Startup();
 };
 
 }  // namespace ipc
 }  // namespace mozilla
 
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -22,17 +22,16 @@
 #include "mozilla/StaticPtr.h"
 #include "mozilla/Unused.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerRef.h"
 #include "mozilla/ipc/ProtocolTypes.h"
-#include "mozilla/net/SocketProcessBridgeChild.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsIEventTarget.h"
 #include "nsIMutable.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIRunnable.h"
 #include "nsISupportsImpl.h"
@@ -40,18 +39,16 @@
 #include "nsITimer.h"
 #include "nsTArray.h"
 #include "nsThreadUtils.h"
 #include "nsTraceRefcnt.h"
 #include "nsXULAppAPI.h"
 #include "nsXPCOMPrivate.h"
 #include "prthread.h"
 
-#include <functional>
-
 #ifdef RELEASE_OR_BETA
 #define THREADSAFETY_ASSERT MOZ_ASSERT
 #else
 #define THREADSAFETY_ASSERT MOZ_RELEASE_ASSERT
 #endif
 
 #define CRASH_IN_CHILD_PROCESS(_msg) \
   do {                               \
@@ -60,32 +57,27 @@
     } else {                         \
       MOZ_CRASH(_msg);               \
     }                                \
   } while (0)
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
-using namespace mozilla::net;
 
 namespace {
 
 class ChildImpl;
 
 // -----------------------------------------------------------------------------
 // Utility Functions
 // -----------------------------------------------------------------------------
 
 void AssertIsInMainProcess() { MOZ_ASSERT(XRE_IsParentProcess()); }
 
-void AssertIsInMainOrSocketProcess() {
-  MOZ_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess());
-}
-
 void AssertIsOnMainThread() { THREADSAFETY_ASSERT(NS_IsMainThread()); }
 
 void AssertIsNotOnMainThread() { THREADSAFETY_ASSERT(!NS_IsMainThread()); }
 
 // -----------------------------------------------------------------------------
 // ParentImpl Declaration
 // -----------------------------------------------------------------------------
 
@@ -104,17 +96,17 @@ class ParentImpl final : public Backgrou
   class CreateActorHelper;
 
   struct MOZ_STACK_CLASS TimerCallbackClosure {
     nsIThread* mThread;
     nsTArray<ParentImpl*>* mLiveActors;
 
     TimerCallbackClosure(nsIThread* aThread, nsTArray<ParentImpl*>* aLiveActors)
         : mThread(aThread), mLiveActors(aLiveActors) {
-      AssertIsInMainOrSocketProcess();
+      AssertIsInMainProcess();
       AssertIsOnMainThread();
       MOZ_ASSERT(aThread);
       MOZ_ASSERT(aLiveActors);
     }
   };
 
   // The length of time we will wait at shutdown for all actors to clean
   // themselves up before forcing them to be destroyed.
@@ -223,30 +215,31 @@ class ParentImpl final : public Backgrou
   }
 
   // For other-process actors.
   explicit ParentImpl(ContentParent* aContent)
       : mContent(aContent),
         mLiveActorArray(nullptr),
         mIsOtherProcessActor(true),
         mActorDestroyed(false) {
-    MOZ_ASSERT((XRE_IsParentProcess() && aContent) || XRE_IsSocketProcess());
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
+    MOZ_ASSERT(aContent);
   }
 
   ~ParentImpl() {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
     MOZ_ASSERT(!mContent);
   }
 
   void MainThreadActorDestroy();
 
   void SetLiveActorArray(nsTArray<ParentImpl*>* aLiveActorArray) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aLiveActorArray);
     MOZ_ASSERT(!aLiveActorArray->Contains(this));
     MOZ_ASSERT(!mLiveActorArray);
     MOZ_ASSERT(mIsOtherProcessActor);
 
     mLiveActorArray = aLiveActorArray;
     mLiveActorArray->AppendElement(this);
@@ -272,17 +265,16 @@ class ChildImpl final : public Backgroun
 
   // A thread-local index that is not valid.
   static const unsigned int kBadThreadLocalIndex =
       static_cast<unsigned int>(-1);
 
   // This is only modified on the main thread. It is the thread-local index that
   // we use to store the BackgroundChild for each thread.
   static unsigned int sThreadLocalIndex;
-  static unsigned int sThreadLocalIndexForSocketProcess;
 
   struct ThreadLocalInfo {
     ThreadLocalInfo()
 #ifdef DEBUG
         : mClosed(false)
 #endif
     {
     }
@@ -295,36 +287,32 @@ class ChildImpl final : public Backgroun
 #endif
   };
 
   // On the main thread, we store TLS in this global instead of in
   // sThreadLocalIndex. That way, cooperative main threads all share the same
   // thread info.
   static ThreadLocalInfo* sMainThreadInfo;
 
-  static ThreadLocalInfo* sMainThreadInfoForSocketProcess;
-
   // This is only modified on the main thread. It prevents us from trying to
   // create the background thread after application shutdown has started.
   static bool sShutdownHasStarted;
 
 #if defined(DEBUG) || !defined(RELEASE_OR_BETA)
   nsISerialEventTarget* mOwningEventTarget;
 #endif
 
 #ifdef DEBUG
   bool mActorWasAlive;
   bool mActorDestroyed;
 #endif
 
  public:
   static void Shutdown();
 
-  static void ShutdownWithThreadLocalIndex(unsigned int aThreadLocalIndex);
-
   void AssertIsOnOwningThread() {
     THREADSAFETY_ASSERT(mOwningEventTarget);
 
 #ifdef RELEASE_OR_BETA
     DebugOnly<bool> current;
 #else
     bool current;
 #endif
@@ -364,33 +352,23 @@ class ChildImpl final : public Backgroun
 
  private:
   // Forwarded from BackgroundChild.
   static void Startup();
 
   // Forwarded from BackgroundChild.
   static PBackgroundChild* GetForCurrentThread();
 
-  // Helper function for getting PBackgroundChild from thread info.
-  static PBackgroundChild* GetFromThreadInfo(nsIEventTarget* aMainEventTarget,
-                                             ThreadLocalInfo* aThreadLocalInfo);
-
   // Forwarded from BackgroundChild.
   static PBackgroundChild* GetOrCreateForCurrentThread(
       nsIEventTarget* aMainEventTarget);
 
   // Forwarded from BackgroundChild.
-  static PBackgroundChild* GetOrCreateSocketActorForCurrentThread(
-      nsIEventTarget* aMainEventTarget);
-
-  // Forwarded from BackgroundChild.
   static void CloseForCurrentThread();
 
-  static void CloseThreadWithIndex(unsigned int aThreadLocalIndex);
-
   // Forwarded from BackgroundChildImpl.
   static BackgroundChildImpl::ThreadLocal* GetThreadLocalForCurrentThread();
 
   static void ThreadLocalDestructor(void* aThreadLocal);
 
   // This class is reference counted.
   ~ChildImpl() { MOZ_ASSERT_IF(mActorWasAlive, mActorDestroyed); }
 
@@ -417,32 +395,32 @@ class ParentImpl::RequestMessageLoopRunn
   nsCOMPtr<nsIThread> mTargetThread;
   MessageLoop* mMessageLoop;
 
  public:
   explicit RequestMessageLoopRunnable(nsIThread* aTargetThread)
       : Runnable("Background::ParentImpl::RequestMessageLoopRunnable"),
         mTargetThread(aTargetThread),
         mMessageLoop(nullptr) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
     MOZ_ASSERT(aTargetThread);
   }
 
  private:
   ~RequestMessageLoopRunnable() {}
 
   NS_DECL_NSIRUNNABLE
 };
 
 class ParentImpl::ShutdownBackgroundThreadRunnable final : public Runnable {
  public:
   ShutdownBackgroundThreadRunnable()
       : Runnable("Background::ParentImpl::ShutdownBackgroundThreadRunnable") {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
   }
 
  private:
   ~ShutdownBackgroundThreadRunnable() {}
 
   NS_DECL_NSIRUNNABLE
 };
@@ -450,17 +428,17 @@ class ParentImpl::ShutdownBackgroundThre
 class ParentImpl::ForceCloseBackgroundActorsRunnable final : public Runnable {
   nsTArray<ParentImpl*>* mActorArray;
 
  public:
   explicit ForceCloseBackgroundActorsRunnable(
       nsTArray<ParentImpl*>* aActorArray)
       : Runnable("Background::ParentImpl::ForceCloseBackgroundActorsRunnable"),
         mActorArray(aActorArray) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
     MOZ_ASSERT(aActorArray);
   }
 
  private:
   ~ForceCloseBackgroundActorsRunnable() {}
 
   NS_DECL_NSIRUNNABLE
@@ -474,24 +452,24 @@ class ParentImpl::ConnectActorRunnable f
  public:
   ConnectActorRunnable(ParentImpl* aActor,
                        Endpoint<PBackgroundParent>&& aEndpoint,
                        nsTArray<ParentImpl*>* aLiveActorArray)
       : Runnable("Background::ParentImpl::ConnectActorRunnable"),
         mActor(aActor),
         mEndpoint(std::move(aEndpoint)),
         mLiveActorArray(aLiveActorArray) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnMainThread();
     MOZ_ASSERT(mEndpoint.IsValid());
     MOZ_ASSERT(aLiveActorArray);
   }
 
  private:
-  ~ConnectActorRunnable() { AssertIsInMainOrSocketProcess(); }
+  ~ConnectActorRunnable() { AssertIsInMainProcess(); }
 
   NS_DECL_NSIRUNNABLE
 };
 
 class ParentImpl::CreateActorHelper final : public Runnable {
   mozilla::Monitor mMonitor;
   RefPtr<ParentImpl> mParentActor;
   nsCOMPtr<nsIThread> mThread;
@@ -499,26 +477,26 @@ class ParentImpl::CreateActorHelper fina
   bool mWaiting;
 
  public:
   explicit CreateActorHelper()
       : Runnable("Background::ParentImpl::CreateActorHelper"),
         mMonitor("CreateActorHelper::mMonitor"),
         mMainThreadResultCode(NS_OK),
         mWaiting(true) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsNotOnMainThread();
   }
 
   nsresult BlockAndGetResults(nsIEventTarget* aMainEventTarget,
                               RefPtr<ParentImpl>& aParentActor,
                               nsCOMPtr<nsIThread>& aThread);
 
  private:
-  ~CreateActorHelper() { AssertIsInMainOrSocketProcess(); }
+  ~CreateActorHelper() { AssertIsInMainProcess(); }
 
   nsresult RunOnMainThread();
 
   NS_DECL_NSIRUNNABLE
 };
 
 class NS_NO_VTABLE ParentImpl::CreateCallback {
  public:
@@ -549,40 +527,35 @@ class ChildImpl::ShutdownObserver final 
 };
 
 class ChildImpl::SendInitBackgroundRunnable final : public CancelableRunnable {
   nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
   RefPtr<StrongWorkerRef> mWorkerRef;
   Endpoint<PBackgroundParent> mParent;
   mozilla::Mutex mMutex;
   bool mSentInitBackground;
-  std::function<void(Endpoint<PBackgroundParent>&& aParent)> mSendInitfunc;
 
  public:
   static already_AddRefed<SendInitBackgroundRunnable> Create(
-      Endpoint<PBackgroundParent>&& aParent,
-      std::function<void(Endpoint<PBackgroundParent>&& aParent)>&& aFunc);
+      Endpoint<PBackgroundParent>&& aParent);
 
   void ClearEventTarget() {
     mWorkerRef = nullptr;
 
     mozilla::MutexAutoLock lock(mMutex);
     mOwningEventTarget = nullptr;
   }
 
  private:
-  explicit SendInitBackgroundRunnable(
-      Endpoint<PBackgroundParent>&& aParent,
-      std::function<void(Endpoint<PBackgroundParent>&& aParent)>&& aFunc)
+  explicit SendInitBackgroundRunnable(Endpoint<PBackgroundParent>&& aParent)
       : CancelableRunnable("Background::ChildImpl::SendInitBackgroundRunnable"),
         mOwningEventTarget(GetCurrentThreadSerialEventTarget()),
         mParent(std::move(aParent)),
         mMutex("SendInitBackgroundRunnable::mMutex"),
-        mSentInitBackground(false),
-        mSendInitfunc(std::move(aFunc)) {}
+        mSentInitBackground(false) {}
 
   ~SendInitBackgroundRunnable() {}
 
   NS_DECL_NSIRUNNABLE
 };
 
 }  // namespace
 
@@ -654,22 +627,16 @@ PBackgroundChild* BackgroundChild::GetFo
 
 // static
 PBackgroundChild* BackgroundChild::GetOrCreateForCurrentThread(
     nsIEventTarget* aMainEventTarget) {
   return ChildImpl::GetOrCreateForCurrentThread(aMainEventTarget);
 }
 
 // static
-PBackgroundChild* BackgroundChild::GetOrCreateSocketActorForCurrentThread(
-    nsIEventTarget* aMainEventTarget) {
-  return ChildImpl::GetOrCreateSocketActorForCurrentThread(aMainEventTarget);
-}
-
-// static
 void BackgroundChild::CloseForCurrentThread() {
   ChildImpl::CloseForCurrentThread();
 }
 
 // -----------------------------------------------------------------------------
 // BackgroundChildImpl Public Methods
 // -----------------------------------------------------------------------------
 
@@ -699,18 +666,16 @@ bool ParentImpl::sShutdownObserverRegist
 
 bool ParentImpl::sShutdownHasStarted = false;
 
 // -----------------------------------------------------------------------------
 // ChildImpl Static Members
 // -----------------------------------------------------------------------------
 
 unsigned int ChildImpl::sThreadLocalIndex = kBadThreadLocalIndex;
-unsigned int ChildImpl::sThreadLocalIndexForSocketProcess =
-    kBadThreadLocalIndex;
 
 bool ChildImpl::sShutdownHasStarted = false;
 
 // -----------------------------------------------------------------------------
 // ParentImpl Implementation
 // -----------------------------------------------------------------------------
 
 // static
@@ -806,17 +771,17 @@ bool ParentImpl::GetLiveActorArray(
   }
 
   return true;
 }
 
 // static
 bool ParentImpl::Alloc(ContentParent* aContent,
                        Endpoint<PBackgroundParent>&& aEndpoint) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
   MOZ_ASSERT(aEndpoint.IsValid());
 
   if (!sBackgroundThread && !CreateBackgroundThread()) {
     NS_WARNING("Failed to create background thread!");
     return false;
   }
 
@@ -897,17 +862,17 @@ already_AddRefed<ChildImpl> ParentImpl::
   // Now that Open() has succeeded transfer the ownership of the actors to IPDL.
   Unused << parentActor.forget();
 
   return childActor.forget();
 }
 
 // static
 bool ParentImpl::CreateBackgroundThread() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
   MOZ_ASSERT(!sBackgroundThread);
   MOZ_ASSERT(!sLiveActorsForBackgroundThread);
 
   if (sShutdownHasStarted) {
     NS_WARNING(
         "Trying to create background thread after shutdown has "
         "already begun!");
@@ -961,17 +926,17 @@ bool ParentImpl::CreateBackgroundThread(
     sShutdownTimer = newShutdownTimer;
   }
 
   return true;
 }
 
 // static
 void ParentImpl::ShutdownBackgroundThread() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
   MOZ_ASSERT(sShutdownHasStarted);
   MOZ_ASSERT_IF(!sBackgroundThread, !sLiveActorCount);
   MOZ_ASSERT_IF(sBackgroundThread, sShutdownTimer);
 
   nsCOMPtr<nsITimer> shutdownTimer = sShutdownTimer.get();
   sShutdownTimer = nullptr;
 
@@ -1006,17 +971,17 @@ void ParentImpl::ShutdownBackgroundThrea
     MOZ_ALWAYS_SUCCEEDS(thread->Dispatch(shutdownRunnable, NS_DISPATCH_NORMAL));
 
     MOZ_ALWAYS_SUCCEEDS(thread->Shutdown());
   }
 }
 
 // static
 void ParentImpl::ShutdownTimerCallback(nsITimer* aTimer, void* aClosure) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
   MOZ_ASSERT(sShutdownHasStarted);
   MOZ_ASSERT(sLiveActorCount);
 
   auto closure = static_cast<TimerCallbackClosure*>(aClosure);
   MOZ_ASSERT(closure);
 
   // Don't let the stack unwind until the ForceCloseBackgroundActorsRunnable has
@@ -1027,40 +992,40 @@ void ParentImpl::ShutdownTimerCallback(n
       new ForceCloseBackgroundActorsRunnable(closure->mLiveActors);
   MOZ_ALWAYS_SUCCEEDS(
       closure->mThread->Dispatch(forceCloseRunnable, NS_DISPATCH_NORMAL));
 }
 
 void ParentImpl::Destroy() {
   // May be called on any thread!
 
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
 
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(
       NewNonOwningRunnableMethod("ParentImpl::MainThreadActorDestroy", this,
                                  &ParentImpl::MainThreadActorDestroy)));
 }
 
 void ParentImpl::MainThreadActorDestroy() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
-  MOZ_ASSERT_IF(mIsOtherProcessActor && XRE_IsParentProcess(), mContent);
+  MOZ_ASSERT_IF(mIsOtherProcessActor, mContent);
   MOZ_ASSERT_IF(!mIsOtherProcessActor, !mContent);
 
   mContent = nullptr;
 
   MOZ_ASSERT(sLiveActorCount);
   sLiveActorCount--;
 
   // This may be the last reference!
   Release();
 }
 
 void ParentImpl::ActorDestroy(ActorDestroyReason aWhy) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(!mActorDestroyed);
   MOZ_ASSERT_IF(mIsOtherProcessActor, mLiveActorArray);
 
   BackgroundParentImpl::ActorDestroy(aWhy);
 
   mActorDestroyed = true;
 
@@ -1081,39 +1046,35 @@ void ParentImpl::ActorDestroy(ActorDestr
       "ParentImpl::Destroy", this, &ParentImpl::Destroy)));
 }
 
 NS_IMPL_ISUPPORTS(ParentImpl::ShutdownObserver, nsIObserver)
 
 NS_IMETHODIMP
 ParentImpl::ShutdownObserver::Observe(nsISupports* aSubject, const char* aTopic,
                                       const char16_t* aData) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
   MOZ_ASSERT(!sShutdownHasStarted);
   MOZ_ASSERT(!strcmp(aTopic, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID));
 
   sShutdownHasStarted = true;
 
   // Do this first before calling (and spinning the event loop in)
   // ShutdownBackgroundThread().
-  // Since we didn't call BackgroundChild::Startup() in socket process,
-  // we can't call ChildImpl::Shutdown() here.
-  if (!XRE_IsSocketProcess()) {
-    ChildImpl::Shutdown();
-  }
+  ChildImpl::Shutdown();
 
   ShutdownBackgroundThread();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ParentImpl::RequestMessageLoopRunnable::Run() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   MOZ_ASSERT(mTargetThread);
 
   if (NS_IsMainThread()) {
     MOZ_ASSERT(mMessageLoop);
 
     if (!sBackgroundThread ||
         !SameCOMIdentity(mTargetThread.get(), sBackgroundThread.get())) {
       return NS_OK;
@@ -1149,29 +1110,29 @@ ParentImpl::RequestMessageLoopRunnable::
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ParentImpl::ShutdownBackgroundThreadRunnable::Run() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
 
   // It is possible that another background thread was created while this thread
   // was shutting down. In that case we can't assert anything about
   // sBackgroundPRThread and we should not modify it here.
   sBackgroundPRThread.compareExchange(PR_GetCurrentThread(), nullptr);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ParentImpl::ForceCloseBackgroundActorsRunnable::Run() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   MOZ_ASSERT(mActorArray);
 
   if (NS_IsMainThread()) {
     MOZ_ASSERT(sLiveActorCount);
     sLiveActorCount--;
     return NS_OK;
   }
 
@@ -1188,17 +1149,17 @@ ParentImpl::ForceCloseBackgroundActorsRu
 
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(this));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ParentImpl::ConnectActorRunnable::Run() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   // Transfer ownership to this thread. If Open() fails then we will release
   // this reference in Destroy.
   ParentImpl* actor;
   mActor.forget(&actor);
 
   Endpoint<PBackgroundParent> endpoint = std::move(mEndpoint);
@@ -1280,92 +1241,67 @@ ParentImpl::CreateActorHelper::Run() {
 
 // static
 void ChildImpl::Startup() {
   // This happens on the main thread but before XPCOM has started so we can't
   // assert that we're being called on the main thread here.
 
   MOZ_ASSERT(sThreadLocalIndex == kBadThreadLocalIndex,
              "BackgroundChild::Startup() called more than once!");
-  MOZ_ASSERT(sThreadLocalIndexForSocketProcess == kBadThreadLocalIndex,
-             "BackgroundChild::Startup() called more than once!");
 
   PRStatus status =
       PR_NewThreadPrivateIndex(&sThreadLocalIndex, ThreadLocalDestructor);
   MOZ_RELEASE_ASSERT(status == PR_SUCCESS, "PR_NewThreadPrivateIndex failed!");
 
-  status = PR_NewThreadPrivateIndex(&sThreadLocalIndexForSocketProcess,
-                                    ThreadLocalDestructor);
-  MOZ_RELEASE_ASSERT(status == PR_SUCCESS, "PR_NewThreadPrivateIndex failed!");
-
   MOZ_ASSERT(sThreadLocalIndex != kBadThreadLocalIndex);
-  MOZ_ASSERT(sThreadLocalIndexForSocketProcess != kBadThreadLocalIndex);
 
   nsCOMPtr<nsIObserverService> observerService = services::GetObserverService();
   MOZ_RELEASE_ASSERT(observerService);
 
   nsCOMPtr<nsIObserver> observer = new ShutdownObserver();
 
   nsresult rv = observerService->AddObserver(
       observer, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID, false);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
 }
 
-void ChildImpl::ShutdownWithThreadLocalIndex(unsigned int aThreadLocalIndex) {
-  MOZ_ASSERT(aThreadLocalIndex != kBadThreadLocalIndex);
+// static
+void ChildImpl::Shutdown() {
+  AssertIsOnMainThread();
+
+  if (sShutdownHasStarted) {
+    MOZ_ASSERT_IF(sThreadLocalIndex != kBadThreadLocalIndex,
+                  !PR_GetThreadPrivate(sThreadLocalIndex));
+    return;
+  }
+
+  sShutdownHasStarted = true;
+
+  MOZ_ASSERT(sThreadLocalIndex != kBadThreadLocalIndex);
 
   ThreadLocalInfo* threadLocalInfo;
 #ifdef DEBUG
   threadLocalInfo =
-      static_cast<ThreadLocalInfo*>(PR_GetThreadPrivate(aThreadLocalIndex));
+      static_cast<ThreadLocalInfo*>(PR_GetThreadPrivate(sThreadLocalIndex));
   MOZ_ASSERT(!threadLocalInfo);
 #endif
-  threadLocalInfo = aThreadLocalIndex == sThreadLocalIndex
-                        ? sMainThreadInfo
-                        : sMainThreadInfoForSocketProcess;
+  threadLocalInfo = sMainThreadInfo;
 
   if (threadLocalInfo) {
 #ifdef DEBUG
     MOZ_ASSERT(!threadLocalInfo->mClosed);
     threadLocalInfo->mClosed = true;
 #endif
 
     ThreadLocalDestructor(threadLocalInfo);
-    if (aThreadLocalIndex == sThreadLocalIndex) {
-      sMainThreadInfo = nullptr;
-    } else {
-      sMainThreadInfoForSocketProcess = nullptr;
-    }
-  }
-}
-
-// static
-void ChildImpl::Shutdown() {
-  AssertIsOnMainThread();
-
-  if (sShutdownHasStarted) {
-    MOZ_ASSERT_IF(sThreadLocalIndex != kBadThreadLocalIndex,
-                  !PR_GetThreadPrivate(sThreadLocalIndex));
-    MOZ_ASSERT_IF(sThreadLocalIndexForSocketProcess != kBadThreadLocalIndex,
-                  !PR_GetThreadPrivate(sThreadLocalIndexForSocketProcess));
-    return;
-  }
-
-  sShutdownHasStarted = true;
-
-  ShutdownWithThreadLocalIndex(sThreadLocalIndex);
-
-  if (sThreadLocalIndexForSocketProcess != kBadThreadLocalIndex) {
-    ShutdownWithThreadLocalIndex(sThreadLocalIndexForSocketProcess);
+    sMainThreadInfo = nullptr;
   }
 }
 
 ChildImpl::ThreadLocalInfo* ChildImpl::sMainThreadInfo = nullptr;
-ChildImpl::ThreadLocalInfo* ChildImpl::sMainThreadInfoForSocketProcess =
-    nullptr;
 
 // static
 PBackgroundChild* ChildImpl::GetForCurrentThread() {
   MOZ_ASSERT(sThreadLocalIndex != kBadThreadLocalIndex);
 
   auto threadLocalInfo = NS_IsMainThread()
                              ? sMainThreadInfo
                              : static_cast<ThreadLocalInfo*>(
@@ -1374,51 +1310,16 @@ PBackgroundChild* ChildImpl::GetForCurre
   if (!threadLocalInfo) {
     return nullptr;
   }
 
   return threadLocalInfo->mActor;
 }
 
 /* static */
-PBackgroundChild* ChildImpl::GetFromThreadInfo(
-    nsIEventTarget* aMainEventTarget, ThreadLocalInfo* aThreadLocalInfo) {
-  MOZ_ASSERT(aThreadLocalInfo);
-
-  if (aThreadLocalInfo->mActor) {
-    RefPtr<SendInitBackgroundRunnable>& runnable =
-        aThreadLocalInfo->mSendInitBackgroundRunnable;
-
-    if (aMainEventTarget && runnable) {
-      // The SendInitBackgroundRunnable was already dispatched to the main
-      // thread to finish initialization of a new background child actor.
-      // However, the caller passed a custom main event target which indicates
-      // that synchronous blocking of the main thread is happening (done by
-      // creating a nested event target and spinning the event loop).
-      // It can happen that the SendInitBackgroundRunnable didn't have a chance
-      // to run before the synchronous blocking has occured. Unblocking of the
-      // main thread can depend on an IPC message received on this thread, so
-      // we have to dispatch the SendInitBackgroundRunnable to the custom main
-      // event target too, otherwise IPC will be only queueing messages on this
-      // thread. The runnable will run twice in the end, but that's a harmless
-      // race between the main and nested event queue of the main thread.
-      // There's a guard in the runnable implementation for calling
-      // SendInitBackground only once.
-
-      MOZ_ALWAYS_SUCCEEDS(
-          aMainEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL));
-    }
-
-    return aThreadLocalInfo->mActor;
-  }
-
-  return nullptr;
-}
-
-/* static */
 PBackgroundChild* ChildImpl::GetOrCreateForCurrentThread(
     nsIEventTarget* aMainEventTarget) {
   MOZ_ASSERT_IF(NS_IsMainThread(), !aMainEventTarget);
 
   MOZ_ASSERT(sThreadLocalIndex != kBadThreadLocalIndex,
              "BackgroundChild::Startup() was never called!");
 
   if (NS_IsMainThread() && sShutdownHasStarted) {
@@ -1440,20 +1341,41 @@ PBackgroundChild* ChildImpl::GetOrCreate
         CRASH_IN_CHILD_PROCESS("PR_SetThreadPrivate failed!");
         return nullptr;
       }
     }
 
     threadLocalInfo = newInfo.forget();
   }
 
-  PBackgroundChild* bgChild =
-      GetFromThreadInfo(aMainEventTarget, threadLocalInfo);
-  if (bgChild) {
-    return bgChild;
+  if (threadLocalInfo->mActor) {
+    RefPtr<SendInitBackgroundRunnable>& runnable =
+        threadLocalInfo->mSendInitBackgroundRunnable;
+
+    if (aMainEventTarget && runnable) {
+      // The SendInitBackgroundRunnable was already dispatched to the main
+      // thread to finish initialization of a new background child actor.
+      // However, the caller passed a custom main event target which indicates
+      // that synchronous blocking of the main thread is happening (done by
+      // creating a nested event target and spinning the event loop).
+      // It can happen that the SendInitBackgroundRunnable didn't have a chance
+      // to run before the synchronous blocking has occured. Unblocking of the
+      // main thread can depend on an IPC message received on this thread, so
+      // we have to dispatch the SendInitBackgroundRunnable to the custom main
+      // event target too, otherwise IPC will be only queueing messages on this
+      // thread. The runnable will run twice in the end, but that's a harmless
+      // race between the main and nested event queue of the main thread.
+      // There's a guard in the runnable implementation for calling
+      // SendInitBackground only once.
+
+      MOZ_ALWAYS_SUCCEEDS(
+          aMainEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL));
+    }
+
+    return threadLocalInfo->mActor;
   }
 
   if (XRE_IsParentProcess()) {
     RefPtr<ChildImpl> strongActor =
         ParentImpl::CreateActorForSameProcess(aMainEventTarget);
     if (NS_WARN_IF(!strongActor)) {
       return nullptr;
     }
@@ -1480,25 +1402,17 @@ PBackgroundChild* ChildImpl::GetOrCreate
                                     base::GetCurrentProcId(), &parent, &child);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to create top level actor!");
     return nullptr;
   }
 
   RefPtr<SendInitBackgroundRunnable> runnable;
   if (!NS_IsMainThread()) {
-    runnable = SendInitBackgroundRunnable::Create(
-        std::move(parent), [](Endpoint<PBackgroundParent>&& aParent) {
-          RefPtr<ContentChild> content = ContentChild::GetSingleton();
-          MOZ_ASSERT(content);
-
-          if (!content->SendInitBackground(std::move(aParent))) {
-            MOZ_CRASH("Failed to create top level actor!");
-          }
-        });
+    runnable = SendInitBackgroundRunnable::Create(std::move(parent));
     if (!runnable) {
       return nullptr;
     }
   }
 
   RefPtr<ChildImpl> strongActor = new ChildImpl();
 
   if (!child.Bind(strongActor)) {
@@ -1526,156 +1440,44 @@ PBackgroundChild* ChildImpl::GetOrCreate
   }
 
   RefPtr<ChildImpl>& actor = threadLocalInfo->mActor;
   strongActor.swap(actor);
 
   return actor;
 }
 
-/* static */
-PBackgroundChild* ChildImpl::GetOrCreateSocketActorForCurrentThread(
-    nsIEventTarget* aMainEventTarget) {
-  MOZ_ASSERT_IF(NS_IsMainThread(), !aMainEventTarget);
+// static
+void ChildImpl::CloseForCurrentThread() {
+  MOZ_ASSERT(!NS_IsMainThread(),
+             "PBackground for the main thread should be shut down via "
+             "ChildImpl::Shutdown().");
 
-  MOZ_ASSERT(sThreadLocalIndexForSocketProcess != kBadThreadLocalIndex,
-             "BackgroundChild::Startup() was never called!");
-
-  if (NS_IsMainThread() && sShutdownHasStarted) {
-    return nullptr;
+  if (sThreadLocalIndex == kBadThreadLocalIndex) {
+    return;
   }
 
   auto threadLocalInfo =
-      NS_IsMainThread() ? sMainThreadInfoForSocketProcess
-                        : static_cast<ThreadLocalInfo*>(PR_GetThreadPrivate(
-                              sThreadLocalIndexForSocketProcess));
-
-  if (!threadLocalInfo) {
-    nsAutoPtr<ThreadLocalInfo> newInfo(new ThreadLocalInfo());
-
-    if (NS_IsMainThread()) {
-      sMainThreadInfoForSocketProcess = newInfo;
-    } else {
-      if (PR_SetThreadPrivate(sThreadLocalIndexForSocketProcess, newInfo) !=
-          PR_SUCCESS) {
-        CRASH_IN_CHILD_PROCESS("PR_SetThreadPrivate failed!");
-        return nullptr;
-      }
-    }
-
-    threadLocalInfo = newInfo.forget();
-  }
-
-  PBackgroundChild* bgChild =
-      GetFromThreadInfo(aMainEventTarget, threadLocalInfo);
-  if (bgChild) {
-    return bgChild;
-  }
-
-  RefPtr<SocketProcessBridgeChild> bridgeChild =
-      SocketProcessBridgeChild::GetSingleton();
-
-  if (!bridgeChild || bridgeChild->IsShuttingDown()) {
-    // The transport for SocketProcessBridgeChild is shut down
-    // and can't be used to open PBackground.
-    return nullptr;
-  }
-
-  Endpoint<PBackgroundParent> parent;
-  Endpoint<PBackgroundChild> child;
-  nsresult rv;
-  rv = PBackground::CreateEndpoints(bridgeChild->SocketProcessPid(),
-                                    base::GetCurrentProcId(), &parent, &child);
-  if (NS_FAILED(rv)) {
-    NS_WARNING("Failed to create top level actor!");
-    return nullptr;
-  }
-
-  RefPtr<SendInitBackgroundRunnable> runnable;
-  if (!NS_IsMainThread()) {
-    runnable = SendInitBackgroundRunnable::Create(
-        std::move(parent), [](Endpoint<PBackgroundParent>&& aParent) {
-          RefPtr<SocketProcessBridgeChild> bridgeChild =
-              SocketProcessBridgeChild::GetSingleton();
-
-          if (!bridgeChild->SendInitBackground(std::move(aParent))) {
-            MOZ_CRASH("Failed to create top level actor!");
-          }
-        });
-    if (!runnable) {
-      return nullptr;
-    }
-  }
-
-  RefPtr<ChildImpl> strongActor = new ChildImpl();
-
-  if (!child.Bind(strongActor)) {
-    CRASH_IN_CHILD_PROCESS("Failed to bind ChildImpl!");
-
-    return nullptr;
-  }
-
-  strongActor->SetActorAlive();
-
-  if (NS_IsMainThread()) {
-    if (!bridgeChild->SendInitBackground(std::move(parent))) {
-      NS_WARNING("Failed to create top level actor!");
-      return nullptr;
-    }
-  } else {
-    if (aMainEventTarget) {
-      MOZ_ALWAYS_SUCCEEDS(
-          aMainEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL));
-    } else {
-      MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(runnable));
-    }
-
-    threadLocalInfo->mSendInitBackgroundRunnable = runnable;
-  }
-
-  RefPtr<ChildImpl>& actor = threadLocalInfo->mActor;
-  strongActor.swap(actor);
-
-  return actor;
-}
-
-// static
-void ChildImpl::CloseThreadWithIndex(unsigned int aThreadLocalIndex) {
-  auto threadLocalInfo =
-      static_cast<ThreadLocalInfo*>(PR_GetThreadPrivate(aThreadLocalIndex));
+      static_cast<ThreadLocalInfo*>(PR_GetThreadPrivate(sThreadLocalIndex));
 
   if (!threadLocalInfo) {
     return;
   }
 
 #ifdef DEBUG
   MOZ_ASSERT(!threadLocalInfo->mClosed);
   threadLocalInfo->mClosed = true;
 #endif
 
   // Clearing the thread local will synchronously close the actor.
-  DebugOnly<PRStatus> status = PR_SetThreadPrivate(aThreadLocalIndex, nullptr);
+  DebugOnly<PRStatus> status = PR_SetThreadPrivate(sThreadLocalIndex, nullptr);
   MOZ_ASSERT(status == PR_SUCCESS);
 }
 
 // static
-void ChildImpl::CloseForCurrentThread() {
-  MOZ_ASSERT(!NS_IsMainThread(),
-             "PBackground for the main thread should be shut down via "
-             "ChildImpl::Shutdown().");
-
-  if (sThreadLocalIndex != kBadThreadLocalIndex) {
-    CloseThreadWithIndex(sThreadLocalIndex);
-  }
-  if (sThreadLocalIndexForSocketProcess != kBadThreadLocalIndex) {
-    CloseThreadWithIndex(sThreadLocalIndexForSocketProcess);
-  }
-}
-
-// static
 BackgroundChildImpl::ThreadLocal* ChildImpl::GetThreadLocalForCurrentThread() {
   MOZ_ASSERT(sThreadLocalIndex != kBadThreadLocalIndex,
              "BackgroundChild::Startup() was never called!");
 
   auto threadLocalInfo = NS_IsMainThread()
                              ? sMainThreadInfo
                              : static_cast<ThreadLocalInfo*>(
                                    PR_GetThreadPrivate(sThreadLocalIndex));
@@ -1734,22 +1536,21 @@ ChildImpl::ShutdownObserver::Observe(nsI
   ChildImpl::Shutdown();
 
   return NS_OK;
 }
 
 // static
 already_AddRefed<ChildImpl::SendInitBackgroundRunnable>
 ChildImpl::SendInitBackgroundRunnable::Create(
-    Endpoint<PBackgroundParent>&& aParent,
-    std::function<void(Endpoint<PBackgroundParent>&& aParent)>&& aFunc) {
+    Endpoint<PBackgroundParent>&& aParent) {
   MOZ_ASSERT(!NS_IsMainThread());
 
   RefPtr<SendInitBackgroundRunnable> runnable =
-      new SendInitBackgroundRunnable(std::move(aParent), std::move(aFunc));
+      new SendInitBackgroundRunnable(std::move(aParent));
 
   WorkerPrivate* workerPrivate = mozilla::dom::GetCurrentThreadWorkerPrivate();
   if (!workerPrivate) {
     return runnable.forget();
   }
 
   workerPrivate->AssertIsOnWorkerThread();
 
@@ -1766,17 +1567,22 @@ NS_IMETHODIMP
 ChildImpl::SendInitBackgroundRunnable::Run() {
   if (NS_IsMainThread()) {
     if (mSentInitBackground) {
       return NS_OK;
     }
 
     mSentInitBackground = true;
 
-    mSendInitfunc(std::move(mParent));
+    RefPtr<ContentChild> content = ContentChild::GetSingleton();
+    MOZ_ASSERT(content);
+
+    if (!content->SendInitBackground(std::move(mParent))) {
+      MOZ_CRASH("Failed to create top level actor!");
+    }
 
     nsCOMPtr<nsISerialEventTarget> owningEventTarget;
     {
       mozilla::MutexAutoLock lock(mMutex);
       owningEventTarget = mOwningEventTarget;
     }
 
     if (!owningEventTarget) {
--- a/ipc/glue/BackgroundParent.h
+++ b/ipc/glue/BackgroundParent.h
@@ -10,23 +10,16 @@
 #include "base/process.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ipc/Transport.h"
 
 template <class>
 struct already_AddRefed;
 
 namespace mozilla {
-
-namespace net {
-
-class SocketProcessBridgeParent;
-
-}  // namespace net
-
 namespace dom {
 
 class BlobImpl;
 class ContentParent;
 
 }  // namespace dom
 
 namespace ipc {
@@ -40,17 +33,16 @@ class Endpoint;
 // member functions.
 class BackgroundParent final {
   friend class mozilla::dom::ContentParent;
 
   typedef base::ProcessId ProcessId;
   typedef mozilla::dom::BlobImpl BlobImpl;
   typedef mozilla::dom::ContentParent ContentParent;
   typedef mozilla::ipc::Transport Transport;
-  friend class mozilla::net::SocketProcessBridgeParent;
 
  public:
   // This function allows the caller to determine if the given parent actor
   // corresponds to a child actor from another process or a child actor from a
   // different thread in the same process.
   // This function may only be called on the background thread.
   static bool IsOtherProcessActor(PBackgroundParent* aBackgroundActor);
 
@@ -76,19 +68,16 @@ class BackgroundParent final {
 
   static bool GetLiveActorArray(PBackgroundParent* aBackgroundActor,
                                 nsTArray<PBackgroundParent*>& aLiveActorArray);
 
  private:
   // Only called by ContentParent for cross-process actors.
   static bool Alloc(ContentParent* aContent,
                     Endpoint<PBackgroundParent>&& aEndpoint);
-
-  // Only called by SocketProcessBridgeParent for cross-process actors.
-  static bool Alloc(Endpoint<PBackgroundParent>&& aEndpoint);
 };
 
 // Implemented in BackgroundImpl.cpp.
 bool IsOnBackgroundThread();
 
 #ifdef DEBUG
 
 // Implemented in BackgroundImpl.cpp.
@@ -97,16 +86,12 @@ void AssertIsOnBackgroundThread();
 #else
 
 inline void AssertIsOnBackgroundThread() {}
 
 #endif  // DEBUG
 
 inline void AssertIsInMainProcess() { MOZ_ASSERT(XRE_IsParentProcess()); }
 
-inline void AssertIsInMainOrSocketProcess() {
-  MOZ_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess());
-}
-
 }  // namespace ipc
 }  // namespace mozilla
 
 #endif  // mozilla_ipc_backgroundparent_h__
--- a/ipc/glue/BackgroundParentImpl.cpp
+++ b/ipc/glue/BackgroundParentImpl.cpp
@@ -113,359 +113,359 @@ class TestParent final : public mozilla:
 namespace mozilla {
 namespace ipc {
 
 using mozilla::dom::BroadcastChannelParent;
 using mozilla::dom::ContentParent;
 using mozilla::dom::ServiceWorkerRegistrationData;
 
 BackgroundParentImpl::BackgroundParentImpl() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
 
   MOZ_COUNT_CTOR(mozilla::ipc::BackgroundParentImpl);
 }
 
 BackgroundParentImpl::~BackgroundParentImpl() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnMainThread();
 
   MOZ_COUNT_DTOR(mozilla::ipc::BackgroundParentImpl);
 }
 
 void BackgroundParentImpl::ActorDestroy(ActorDestroyReason aWhy) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 }
 
 BackgroundParentImpl::PBackgroundTestParent*
 BackgroundParentImpl::AllocPBackgroundTestParent(const nsCString& aTestArg) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return new TestParent();
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPBackgroundTestConstructor(
     PBackgroundTestParent* aActor, const nsCString& aTestArg) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!PBackgroundTestParent::Send__delete__(aActor, aTestArg)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundTestParent(
     PBackgroundTestParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<TestParent*>(aActor);
   return true;
 }
 
 auto BackgroundParentImpl::AllocPBackgroundIDBFactoryParent(
     const LoggingInfo& aLoggingInfo) -> PBackgroundIDBFactoryParent* {
   using mozilla::dom::indexedDB::AllocPBackgroundIDBFactoryParent;
 
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return AllocPBackgroundIDBFactoryParent(aLoggingInfo);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundIDBFactoryConstructor(
     PBackgroundIDBFactoryParent* aActor, const LoggingInfo& aLoggingInfo) {
   using mozilla::dom::indexedDB::RecvPBackgroundIDBFactoryConstructor;
 
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!RecvPBackgroundIDBFactoryConstructor(aActor, aLoggingInfo)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundIDBFactoryParent(
     PBackgroundIDBFactoryParent* aActor) {
   using mozilla::dom::indexedDB::DeallocPBackgroundIDBFactoryParent;
 
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return DeallocPBackgroundIDBFactoryParent(aActor);
 }
 
 auto BackgroundParentImpl::AllocPBackgroundIndexedDBUtilsParent()
     -> PBackgroundIndexedDBUtilsParent* {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::indexedDB::AllocPBackgroundIndexedDBUtilsParent();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundIndexedDBUtilsParent(
     PBackgroundIndexedDBUtilsParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::indexedDB::DeallocPBackgroundIndexedDBUtilsParent(
       aActor);
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvFlushPendingFileDeletions() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   if (!mozilla::dom::indexedDB::RecvFlushPendingFileDeletions()) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 BackgroundParentImpl::PBackgroundSDBConnectionParent*
 BackgroundParentImpl::AllocPBackgroundSDBConnectionParent(
     const PrincipalInfo& aPrincipalInfo) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundSDBConnectionParent(aPrincipalInfo);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundSDBConnectionConstructor(
     PBackgroundSDBConnectionParent* aActor,
     const PrincipalInfo& aPrincipalInfo) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!mozilla::dom::RecvPBackgroundSDBConnectionConstructor(aActor,
                                                              aPrincipalInfo)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundSDBConnectionParent(
     PBackgroundSDBConnectionParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundSDBConnectionParent(aActor);
 }
 
 BackgroundParentImpl::PBackgroundLSDatabaseParent*
 BackgroundParentImpl::AllocPBackgroundLSDatabaseParent(
     const PrincipalInfo& aPrincipalInfo, const uint32_t& aPrivateBrowsingId,
     const uint64_t& aDatastoreId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundLSDatabaseParent(
       aPrincipalInfo, aPrivateBrowsingId, aDatastoreId);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundLSDatabaseConstructor(
     PBackgroundLSDatabaseParent* aActor, const PrincipalInfo& aPrincipalInfo,
     const uint32_t& aPrivateBrowsingId, const uint64_t& aDatastoreId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!mozilla::dom::RecvPBackgroundLSDatabaseConstructor(
           aActor, aPrincipalInfo, aPrivateBrowsingId, aDatastoreId)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundLSDatabaseParent(
     PBackgroundLSDatabaseParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundLSDatabaseParent(aActor);
 }
 
 BackgroundParentImpl::PBackgroundLSObserverParent*
 BackgroundParentImpl::AllocPBackgroundLSObserverParent(
     const uint64_t& aObserverId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundLSObserverParent(aObserverId);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundLSObserverConstructor(
     PBackgroundLSObserverParent* aActor, const uint64_t& aObserverId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!mozilla::dom::RecvPBackgroundLSObserverConstructor(aActor,
                                                           aObserverId)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundLSObserverParent(
     PBackgroundLSObserverParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundLSObserverParent(aActor);
 }
 
 BackgroundParentImpl::PBackgroundLSRequestParent*
 BackgroundParentImpl::AllocPBackgroundLSRequestParent(
     const LSRequestParams& aParams) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundLSRequestParent(this, aParams);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundLSRequestConstructor(
     PBackgroundLSRequestParent* aActor, const LSRequestParams& aParams) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!mozilla::dom::RecvPBackgroundLSRequestConstructor(aActor, aParams)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundLSRequestParent(
     PBackgroundLSRequestParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundLSRequestParent(aActor);
 }
 
 BackgroundParentImpl::PBackgroundLSSimpleRequestParent*
 BackgroundParentImpl::AllocPBackgroundLSSimpleRequestParent(
     const LSSimpleRequestParams& aParams) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundLSSimpleRequestParent(aParams);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundLSSimpleRequestConstructor(
     PBackgroundLSSimpleRequestParent* aActor,
     const LSSimpleRequestParams& aParams) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   if (!mozilla::dom::RecvPBackgroundLSSimpleRequestConstructor(aActor,
                                                                aParams)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundLSSimpleRequestParent(
     PBackgroundLSSimpleRequestParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundLSSimpleRequestParent(aActor);
 }
 
 BackgroundParentImpl::PBackgroundLocalStorageCacheParent*
 BackgroundParentImpl::AllocPBackgroundLocalStorageCacheParent(
     const PrincipalInfo& aPrincipalInfo, const nsCString& aOriginKey,
     const uint32_t& aPrivateBrowsingId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundLocalStorageCacheParent(
       aPrincipalInfo, aOriginKey, aPrivateBrowsingId);
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPBackgroundLocalStorageCacheConstructor(
     PBackgroundLocalStorageCacheParent* aActor,
     const PrincipalInfo& aPrincipalInfo, const nsCString& aOriginKey,
     const uint32_t& aPrivateBrowsingId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::RecvPBackgroundLocalStorageCacheConstructor(
       this, aActor, aPrincipalInfo, aOriginKey, aPrivateBrowsingId);
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundLocalStorageCacheParent(
     PBackgroundLocalStorageCacheParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundLocalStorageCacheParent(aActor);
 }
 
 auto BackgroundParentImpl::AllocPBackgroundStorageParent(
     const nsString& aProfilePath) -> PBackgroundStorageParent* {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::AllocPBackgroundStorageParent(aProfilePath);
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPBackgroundStorageConstructor(
     PBackgroundStorageParent* aActor, const nsString& aProfilePath) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::RecvPBackgroundStorageConstructor(aActor, aProfilePath);
 }
 
 bool BackgroundParentImpl::DeallocPBackgroundStorageParent(
     PBackgroundStorageParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundStorageParent(aActor);
 }
 
 PPendingIPCBlobParent* BackgroundParentImpl::AllocPPendingIPCBlobParent(
     const IPCBlob& aBlob) {
   MOZ_CRASH("PPendingIPCBlobParent actors should be manually constructed!");
 }
 
 bool BackgroundParentImpl::DeallocPPendingIPCBlobParent(
     PPendingIPCBlobParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete aActor;
   return true;
 }
 
 mozilla::dom::PRemoteWorkerParent*
@@ -540,17 +540,17 @@ mozilla::ipc::IPCResult BackgroundParent
 bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
     PTemporaryIPCBlobParent* aActor) {
   delete aActor;
   return true;
 }
 
 PIPCBlobInputStreamParent* BackgroundParentImpl::AllocPIPCBlobInputStreamParent(
     const nsID& aID, const uint64_t& aSize) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
       mozilla::dom::IPCBlobInputStreamParent::Create(aID, aSize, this);
   return actor.forget().take();
 }
 
 mozilla::ipc::IPCResult
@@ -561,36 +561,36 @@ BackgroundParentImpl::RecvPIPCBlobInputS
     return IPC_FAIL_NO_REASON(this);
   }
 
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPIPCBlobInputStreamParent(
     PIPCBlobInputStreamParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
       dont_AddRef(static_cast<mozilla::dom::IPCBlobInputStreamParent*>(aActor));
   return true;
 }
 
 PFileDescriptorSetParent* BackgroundParentImpl::AllocPFileDescriptorSetParent(
     const FileDescriptor& aFileDescriptor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return new FileDescriptorSetParent(aFileDescriptor);
 }
 
 bool BackgroundParentImpl::DeallocPFileDescriptorSetParent(
     PFileDescriptorSetParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<FileDescriptorSetParent*>(aActor);
   return true;
 }
 
 PChildToParentStreamParent*
@@ -612,53 +612,53 @@ BackgroundParentImpl::AllocPParentToChil
 
 bool BackgroundParentImpl::DeallocPParentToChildStreamParent(
     PParentToChildStreamParent* aActor) {
   delete aActor;
   return true;
 }
 
 BackgroundParentImpl::PVsyncParent* BackgroundParentImpl::AllocPVsyncParent() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<mozilla::layout::VsyncParent> actor =
       mozilla::layout::VsyncParent::Create();
   // There still has one ref-count after return, and it will be released in
   // DeallocPVsyncParent().
   return actor.forget().take();
 }
 
 bool BackgroundParentImpl::DeallocPVsyncParent(PVsyncParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   // This actor already has one ref-count. Please check AllocPVsyncParent().
   RefPtr<mozilla::layout::VsyncParent> actor =
       dont_AddRef(static_cast<mozilla::layout::VsyncParent*>(aActor));
   return true;
 }
 
 camera::PCamerasParent* BackgroundParentImpl::AllocPCamerasParent() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
 #ifdef MOZ_WEBRTC
   RefPtr<mozilla::camera::CamerasParent> actor =
       mozilla::camera::CamerasParent::Create();
   return actor.forget().take();
 #else
   return nullptr;
 #endif
 }
 
 bool BackgroundParentImpl::DeallocPCamerasParent(
     camera::PCamerasParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
 #ifdef MOZ_WEBRTC
   RefPtr<mozilla::camera::CamerasParent> actor =
       dont_AddRef(static_cast<mozilla::camera::CamerasParent*>(aActor));
 #endif
   return true;
@@ -670,17 +670,17 @@ auto BackgroundParentImpl::AllocPUDPSock
   RefPtr<UDPSocketParent> p = new UDPSocketParent(this);
 
   return p.forget().take();
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPUDPSocketConstructor(
     PUDPSocketParent* aActor, const OptionalPrincipalInfo& aOptionalPrincipal,
     const nsCString& aFilter) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   if (aOptionalPrincipal.type() == OptionalPrincipalInfo::TPrincipalInfo) {
     // Support for checking principals (for non-mtransport use) will be handled
     // in bug 1167039
     return IPC_FAIL_NO_REASON(this);
   }
   // No principal - This must be from mtransport (WebRTC/ICE) - We'd want
@@ -708,17 +708,17 @@ bool BackgroundParentImpl::DeallocPUDPSo
   p->Release();
   return true;
 }
 
 mozilla::dom::PBroadcastChannelParent*
 BackgroundParentImpl::AllocPBroadcastChannelParent(
     const PrincipalInfo& aPrincipalInfo, const nsCString& aOrigin,
     const nsString& aChannel) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   nsString originChannelKey;
 
   // The format of originChannelKey is:
   //  <channelName>|<origin+OriginAttributes>
 
   originChannelKey.Assign(aChannel);
@@ -745,17 +745,17 @@ class CheckPrincipalRunnable final : pub
  public:
   CheckPrincipalRunnable(already_AddRefed<ContentParent> aParent,
                          const PrincipalInfo& aPrincipalInfo,
                          const nsCString& aOrigin)
       : Runnable("ipc::CheckPrincipalRunnable"),
         mContentParent(aParent),
         mPrincipalInfo(aPrincipalInfo),
         mOrigin(aOrigin) {
-    AssertIsInMainOrSocketProcess();
+    AssertIsInMainProcess();
     AssertIsOnBackgroundThread();
 
     MOZ_ASSERT(mContentParent);
   }
 
   NS_IMETHOD Run() override {
     MOZ_ASSERT(NS_IsMainThread());
 
@@ -786,17 +786,17 @@ class CheckPrincipalRunnable final : pub
   nsCString mOrigin;
 };
 
 }  // namespace
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPBroadcastChannelConstructor(
     PBroadcastChannelParent* actor, const PrincipalInfo& aPrincipalInfo,
     const nsCString& aOrigin, const nsString& aChannel) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<ContentParent> parent = BackgroundParent::GetContentParent(this);
 
   // If the ContentParent is null we are dealing with a same-process actor.
   if (!parent) {
     return IPC_OK();
   }
@@ -805,49 +805,49 @@ mozilla::ipc::IPCResult BackgroundParent
       new CheckPrincipalRunnable(parent.forget(), aPrincipalInfo, aOrigin);
   MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(runnable));
 
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPBroadcastChannelParent(
     PBroadcastChannelParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<BroadcastChannelParent*>(aActor);
   return true;
 }
 
 mozilla::dom::PServiceWorkerManagerParent*
 BackgroundParentImpl::AllocPServiceWorkerManagerParent() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<dom::ServiceWorkerManagerParent> agent =
       new dom::ServiceWorkerManagerParent();
   return agent.forget().take();
 }
 
 bool BackgroundParentImpl::DeallocPServiceWorkerManagerParent(
     PServiceWorkerManagerParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   RefPtr<dom::ServiceWorkerManagerParent> parent =
       dont_AddRef(static_cast<dom::ServiceWorkerManagerParent*>(aActor));
   MOZ_ASSERT(parent);
   return true;
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvShutdownServiceWorkerRegistrar() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   if (BackgroundParent::IsOtherProcessActor(this)) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   RefPtr<dom::ServiceWorkerRegistrar> service =
       dom::ServiceWorkerRegistrar::Get();
@@ -889,96 +889,96 @@ bool BackgroundParentImpl::DeallocPCache
     PCacheStreamControlParent* aActor) {
   dom::cache::DeallocPCacheStreamControlParent(aActor);
   return true;
 }
 
 PMessagePortParent* BackgroundParentImpl::AllocPMessagePortParent(
     const nsID& aUUID, const nsID& aDestinationUUID,
     const uint32_t& aSequenceID) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return new MessagePortParent(aUUID);
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPMessagePortConstructor(
     PMessagePortParent* aActor, const nsID& aUUID, const nsID& aDestinationUUID,
     const uint32_t& aSequenceID) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   MessagePortParent* mp = static_cast<MessagePortParent*>(aActor);
   if (!mp->Entangle(aDestinationUUID, aSequenceID)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPMessagePortParent(
     PMessagePortParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<MessagePortParent*>(aActor);
   return true;
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvMessagePortForceClose(
     const nsID& aUUID, const nsID& aDestinationUUID,
     const uint32_t& aSequenceID) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   if (!MessagePortParent::ForceClose(aUUID, aDestinationUUID, aSequenceID)) {
     return IPC_FAIL_NO_REASON(this);
   }
   return IPC_OK();
 }
 
 PAsmJSCacheEntryParent* BackgroundParentImpl::AllocPAsmJSCacheEntryParent(
     const dom::asmjscache::OpenMode& aOpenMode,
     const dom::asmjscache::WriteParams& aWriteParams,
     const PrincipalInfo& aPrincipalInfo) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return dom::asmjscache::AllocEntryParent(aOpenMode, aWriteParams,
                                            aPrincipalInfo);
 }
 
 bool BackgroundParentImpl::DeallocPAsmJSCacheEntryParent(
     PAsmJSCacheEntryParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   dom::asmjscache::DeallocEntryParent(aActor);
   return true;
 }
 
 BackgroundParentImpl::PQuotaParent* BackgroundParentImpl::AllocPQuotaParent() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   return mozilla::dom::quota::AllocPQuotaParent();
 }
 
 bool BackgroundParentImpl::DeallocPQuotaParent(PQuotaParent* aActor) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::quota::DeallocPQuotaParent(aActor);
 }
 
 dom::PFileSystemRequestParent*
 BackgroundParentImpl::AllocPFileSystemRequestParent(
     const FileSystemParams& aParams) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<FileSystemRequestParent> result = new FileSystemRequestParent();
 
   if (NS_WARN_IF(!result->Initialize(aParams))) {
     return nullptr;
   }
 
@@ -988,17 +988,17 @@ BackgroundParentImpl::AllocPFileSystemRe
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPFileSystemRequestConstructor(
     PFileSystemRequestParent* aActor, const FileSystemParams& params) {
   static_cast<FileSystemRequestParent*>(aActor)->Start();
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPFileSystemRequestParent(
     PFileSystemRequestParent* aDoomed) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<FileSystemRequestParent> parent =
       dont_AddRef(static_cast<FileSystemRequestParent*>(aDoomed));
   return true;
 }
 
 // Gamepad API Background IPC
@@ -1044,89 +1044,89 @@ bool BackgroundParentImpl::DeallocPWebAu
   MOZ_ASSERT(aActor);
   delete aActor;
   return true;
 }
 
 net::PHttpBackgroundChannelParent*
 BackgroundParentImpl::AllocPHttpBackgroundChannelParent(
     const uint64_t& aChannelId) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<net::HttpBackgroundChannelParent> actor =
       new net::HttpBackgroundChannelParent();
 
   // hold extra refcount for IPDL
   return actor.forget().take();
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPHttpBackgroundChannelConstructor(
     net::PHttpBackgroundChannelParent* aActor, const uint64_t& aChannelId) {
   MOZ_ASSERT(aActor);
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   net::HttpBackgroundChannelParent* aParent =
       static_cast<net::HttpBackgroundChannelParent*>(aActor);
 
   if (NS_WARN_IF(NS_FAILED(aParent->Init(aChannelId)))) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPHttpBackgroundChannelParent(
     net::PHttpBackgroundChannelParent* aActor) {
   MOZ_ASSERT(aActor);
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   // release extra refcount hold by AllocPHttpBackgroundChannelParent
   RefPtr<net::HttpBackgroundChannelParent> actor =
       dont_AddRef(static_cast<net::HttpBackgroundChannelParent*>(aActor));
 
   return true;
 }
 
 PMIDIPortParent* BackgroundParentImpl::AllocPMIDIPortParent(
     const MIDIPortInfo& aPortInfo, const bool& aSysexEnabled) {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<MIDIPortParent> result = new MIDIPortParent(aPortInfo, aSysexEnabled);
   return result.forget().take();
 }
 
 bool BackgroundParentImpl::DeallocPMIDIPortParent(PMIDIPortParent* aActor) {
   MOZ_ASSERT(aActor);
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<MIDIPortParent> parent =
       dont_AddRef(static_cast<MIDIPortParent*>(aActor));
   parent->Teardown();
   return true;
 }
 
 PMIDIManagerParent* BackgroundParentImpl::AllocPMIDIManagerParent() {
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<MIDIManagerParent> result = new MIDIManagerParent();
   MIDIPlatformService::Get()->AddManager(result);
   return result.forget().take();
 }
 
 bool BackgroundParentImpl::DeallocPMIDIManagerParent(
     PMIDIManagerParent* aActor) {
   MOZ_ASSERT(aActor);
-  AssertIsInMainOrSocketProcess();
+  AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 
   RefPtr<MIDIManagerParent> parent =
       dont_AddRef(static_cast<MIDIManagerParent*>(aActor));
   parent->Teardown();
   return true;
 }
 
@@ -1240,11 +1240,11 @@ mozilla::ipc::IPCResult BackgroundParent
 
   return IPC_OK();
 }
 
 }  // namespace ipc
 }  // namespace mozilla
 
 void TestParent::ActorDestroy(ActorDestroyReason aWhy) {
-  mozilla::ipc::AssertIsInMainOrSocketProcess();
+  mozilla::ipc::AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
 }
--- a/ipc/glue/CrashReporterHost.cpp
+++ b/ipc/glue/CrashReporterHost.cpp
@@ -31,21 +31,19 @@ static_assert(nsICrashService::PROCESS_T
 static_assert(nsICrashService::PROCESS_TYPE_GMPLUGIN == (int)GeckoProcessType_GMPlugin,
               "GeckoProcessType enum is out of sync with nsICrashService!");
 static_assert(nsICrashService::PROCESS_TYPE_GPU == (int)GeckoProcessType_GPU,
               "GeckoProcessType enum is out of sync with nsICrashService!");
 static_assert(nsICrashService::PROCESS_TYPE_VR == (int)GeckoProcessType_VR,
               "GeckoProcessType enum is out of sync with nsICrashService!");
 static_assert(nsICrashService::PROCESS_TYPE_RDD == (int)GeckoProcessType_RDD,
               "GeckoProcessType enum is out of sync with nsICrashService!");
-static_assert(nsICrashService::PROCESS_TYPE_SOCKET == (int)GeckoProcessType_Socket,
-              "GeckoProcessType enum is out of sync with nsICrashService!");
 // Add new static asserts here if you add more process types.
 // Update this static assert as well.
-static_assert(nsICrashService::PROCESS_TYPE_SOCKET + 1 == (int)GeckoProcessType_End,
+static_assert(nsICrashService::PROCESS_TYPE_RDD + 1 == (int)GeckoProcessType_End,
               "GeckoProcessType enum is out of sync with nsICrashService!");
 
 
 namespace mozilla {
 namespace ipc {
 
 CrashReporterHost::CrashReporterHost(GeckoProcessType aProcessType,
                                      const Shmem& aShmem,
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -149,18 +149,17 @@ GeckoChildProcessHost::~GeckoChildProces
 
 // static
 auto GeckoChildProcessHost::GetPathToBinary(FilePath& exePath,
                                             GeckoProcessType processType)
     -> BinaryPathType {
   if (sRunSelfAsContentProc && (processType == GeckoProcessType_Content ||
                                 processType == GeckoProcessType_GPU ||
                                 processType == GeckoProcessType_VR ||
-                                processType == GeckoProcessType_RDD ||
-                                processType == GeckoProcessType_Socket)) {
+                                processType == GeckoProcessType_RDD)) {
 #if defined(OS_WIN)
     wchar_t exePathBuf[MAXPATHLEN];
     if (!::GetModuleFileNameW(nullptr, exePathBuf, MAXPATHLEN)) {
       MOZ_CRASH("GetModuleFileNameW failed (FIXME)");
     }
 #if defined(MOZ_SANDBOX)
     // We need to start the child process using the real path, so that the
     // sandbox policy rules will match for DLLs loaded from the bin dir after
@@ -972,19 +971,16 @@ bool GeckoChildProcessHost::PerformAsync
     case GeckoProcessType_RDD:
       if (!PR_GetEnv("MOZ_DISABLE_RDD_SANDBOX")) {
         if (!mSandboxBroker.SetSecurityLevelForRDDProcess()) {
           return false;
         }
         shouldSandboxCurrentProcess = true;
       }
       break;
-    case GeckoProcessType_Socket:
-      // TODO - setup sandboxing for the socket process.
-      break;
     case GeckoProcessType_Default:
     default:
       MOZ_CRASH("Bad process type in GeckoChildProcessHost");
       break;
   };
 
   if (shouldSandboxCurrentProcess) {
     for (auto it = mAllowedFilesRead.begin(); it != mAllowedFilesRead.end();
--- a/ipc/glue/ProcessUtils.h
+++ b/ipc/glue/ProcessUtils.h
@@ -2,70 +2,19 @@
 /* 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/. */
 
 #ifndef mozilla_ipc_ProcessUtils_h
 #define mozilla_ipc_ProcessUtils_h
 
-#include "FileDescriptor.h"
-#include "base/shared_memory.h"
-
 namespace mozilla {
 namespace ipc {
 
 // You probably should call ContentChild::SetProcessName instead of calling
 // this directly.
-void SetThisProcessName(const char* aName);
-
-class SharedPreferenceSerializer final {
- public:
-  SharedPreferenceSerializer();
-  SharedPreferenceSerializer(SharedPreferenceSerializer&& aOther);
-  ~SharedPreferenceSerializer();
-
-  bool SerializeToSharedMemory();
-
-  base::SharedMemoryHandle GetSharedMemoryHandle() const {
-    return mShm.handle();
-  }
-
-  const FileDescriptor::UniquePlatformHandle& GetPrefMapHandle() const {
-    return mPrefMapHandle;
-  }
-
-  nsACString::size_type GetPrefLength() const { return mPrefs.Length(); }
-
-  size_t GetPrefMapSize() const { return mPrefMapSize; }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(SharedPreferenceSerializer);
-  size_t mPrefMapSize;
-  FileDescriptor::UniquePlatformHandle mPrefMapHandle;
-  base::SharedMemory mShm;
-  nsAutoCStringN<1024> mPrefs;
-};
-
-class SharedPreferenceDeserializer final {
- public:
-  SharedPreferenceDeserializer();
-  ~SharedPreferenceDeserializer();
-
-  bool DeserializeFromSharedMemory(char* aPrefsHandleStr,
-                                   char* aPrefMapHandleStr, char* aPrefsLenStr,
-                                   char* aPrefMapSizeStr);
-
-  const base::SharedMemoryHandle& GetPrefsHandle() const;
-  const FileDescriptor& GetPrefMapHandle() const;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(SharedPreferenceDeserializer);
-  Maybe<base::SharedMemoryHandle> mPrefsHandle;
-  Maybe<FileDescriptor> mPrefMapHandle;
-  Maybe<size_t> mPrefsLen;
-  Maybe<size_t> mPrefMapSize;
-};
+void SetThisProcessName(const char *aName);
 
 }  // namespace ipc
 }  // namespace mozilla
 
 #endif  // ifndef mozilla_ipc_ProcessUtils_h
deleted file mode 100644
--- a/ipc/glue/ProcessUtils_common.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- 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 "ProcessUtils.h"
-
-#include "mozilla/Preferences.h"
-
-namespace mozilla {
-namespace ipc {
-
-SharedPreferenceSerializer::SharedPreferenceSerializer() : mPrefMapSize(0) {
-  MOZ_COUNT_CTOR(SharedPreferenceSerializer);
-}
-
-SharedPreferenceSerializer::~SharedPreferenceSerializer() {
-  MOZ_COUNT_DTOR(SharedPreferenceSerializer);
-}
-
-SharedPreferenceSerializer::SharedPreferenceSerializer(
-    SharedPreferenceSerializer&& aOther)
-    : mPrefMapSize(aOther.mPrefMapSize),
-      mPrefMapHandle(std::move(aOther.mPrefMapHandle)),
-      mShm(std::move(aOther.mShm)),
-      mPrefs(std::move(aOther.mPrefs)) {
-  MOZ_COUNT_CTOR(SharedPreferenceSerializer);
-}
-
-bool SharedPreferenceSerializer::SerializeToSharedMemory() {
-  mPrefMapHandle =
-      Preferences::EnsureSnapshot(&mPrefMapSize).ClonePlatformHandle();
-
-  // Serialize the early prefs.
-  Preferences::SerializePreferences(mPrefs);
-
-  // Set up the shared memory.
-  if (!mShm.Create(mPrefs.Length())) {
-    NS_ERROR("failed to create shared memory in the parent");
-    return false;
-  }
-  if (!mShm.Map(mPrefs.Length())) {
-    NS_ERROR("failed to map shared memory in the parent");
-    return false;
-  }
-
-  // Copy the serialized prefs into the shared memory.
-  memcpy(static_cast<char*>(mShm.memory()), mPrefs.get(), mPrefs.Length());
-
-  return true;
-}
-
-#ifdef ANDROID
-static int gPrefsFd = -1;
-static int gPrefMapFd = -1;
-
-void SetPrefsFd(int aFd) { gPrefsFd = aFd; }
-
-void SetPrefMapFd(int aFd) { gPrefMapFd = aFd; }
-#endif
-
-SharedPreferenceDeserializer::SharedPreferenceDeserializer() {
-  MOZ_COUNT_CTOR(SharedPreferenceDeserializer);
-}
-
-SharedPreferenceDeserializer::~SharedPreferenceDeserializer() {
-  MOZ_COUNT_DTOR(SharedPreferenceDeserializer);
-}
-
-bool SharedPreferenceDeserializer::DeserializeFromSharedMemory(
-    char* aPrefsHandleStr, char* aPrefMapHandleStr, char* aPrefsLenStr,
-    char* aPrefMapSizeStr) {
-  // Parses an arg containing a pointer-sized-integer.
-  auto parseUIntPtrArg = [](char*& aArg) {
-    // ContentParent uses %zu to print a word-sized unsigned integer. So
-    // even though strtoull() returns a long long int, it will fit in a
-    // uintptr_t.
-    return uintptr_t(strtoull(aArg, &aArg, 10));
-  };
-
-#ifdef XP_WIN
-  auto parseHandleArg = [&](char*& aArg) {
-    return HANDLE(parseUIntPtrArg(aArg));
-  };
-
-  mPrefsHandle = Some(parseHandleArg(aPrefsHandleStr));
-  if (aPrefsHandleStr[0] != '\0') {
-    return false;
-  }
-
-  // The FileDescriptor constructor will clone this handle when constructed,
-  // so store it in a UniquePlatformHandle to make sure the original gets
-  // closed.
-  FileDescriptor::UniquePlatformHandle handle(
-      parseHandleArg(aPrefMapHandleStr));
-  if (aPrefMapHandleStr[0] != '\0') {
-    return false;
-  }
-
-  mPrefMapHandle.emplace(handle.get());
-#endif
-
-  mPrefsLen = Some(parseUIntPtrArg(aPrefsLenStr));
-  if (aPrefsLenStr[0] != '\0') {
-    return false;
-  }
-
-  mPrefMapSize = Some(parseUIntPtrArg(aPrefMapSizeStr));
-  if (aPrefMapSizeStr[0] != '\0') {
-    return false;
-  }
-
-#ifdef ANDROID
-  // Android is different; get the FD via gPrefsFd instead of a fixed fd.
-  MOZ_RELEASE_ASSERT(gPrefsFd != -1);
-  mPrefsHandle = Some(base::FileDescriptor(gPrefsFd, /* auto_close */ true));
-
-  FileDescriptor::UniquePlatformHandle handle(gPrefMapFd);
-  mPrefMapHandle.emplace(handle.get());
-#elif XP_UNIX
-  mPrefsHandle = Some(base::FileDescriptor(kPrefsFileDescriptor,
-                                           /* auto_close */ true));
-
-  // The FileDescriptor constructor will clone this handle when constructed,
-  // so store it in a UniquePlatformHandle to make sure the original gets
-  // closed.
-  FileDescriptor::UniquePlatformHandle handle(kPrefMapFileDescriptor);
-  mPrefMapHandle.emplace(handle.get());
-#endif
-
-  if (mPrefsHandle.isNothing() || mPrefsLen.isNothing() ||
-      mPrefMapHandle.isNothing() || mPrefMapSize.isNothing()) {
-    return false;
-  }
-
-  // Init the shared-memory base preference mapping first, so that only changed
-  // preferences wind up in heap memory.
-  Preferences::InitSnapshot(mPrefMapHandle.ref(), *mPrefMapSize);
-
-  // Set up early prefs from the shared memory.
-  base::SharedMemory shm;
-  if (!shm.SetHandle(*mPrefsHandle, /* read_only */ true)) {
-    NS_ERROR("failed to open shared memory in the child");
-    return false;
-  }
-  if (!shm.Map(*mPrefsLen)) {
-    NS_ERROR("failed to map shared memory in the child");
-    return false;
-  }
-  Preferences::DeserializePreferences(static_cast<char*>(shm.memory()),
-                                      *mPrefsLen);
-
-  return true;
-}
-
-const base::SharedMemoryHandle& SharedPreferenceDeserializer::GetPrefsHandle()
-    const {
-  MOZ_ASSERT(mPrefsHandle.isSome());
-
-  return mPrefsHandle.ref();
-}
-
-const FileDescriptor& SharedPreferenceDeserializer::GetPrefMapHandle() const {
-  MOZ_ASSERT(mPrefMapHandle.isSome());
-
-  return mPrefMapHandle.ref();
-}
-
-}  // namespace ipc
-}  // namespace mozilla
\ No newline at end of file
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -158,17 +158,16 @@ UNIFIED_SOURCES += [
     'IPCStreamDestination.cpp',
     'IPCStreamParent.cpp',
     'IPCStreamSource.cpp',
     'IPCStreamUtils.cpp',
     'MessageChannel.cpp',
     'MessageLink.cpp',
     'MessagePump.cpp',
     'ProcessChild.cpp',
-    'ProcessUtils_common.cpp',
     'ProtocolUtils.cpp',
     'ScopedXREEmbed.cpp',
     'SharedMemory.cpp',
     'Shmem.cpp',
     'StringUtil.cpp',
     'URIUtils.cpp',
 ]
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1941,22 +1941,16 @@ pref("network.sts.poll_busy_wait_period_
 pref("network.sts.max_time_for_pr_close_during_shutdown", 5000);
 
 // When the polling socket pair we use to wake poll() up on demand doesn't
 // get signalled (is not readable) within this timeout, we try to repair it.
 // This timeout can be disabled by setting this pref to 0.
 // The value is expected in seconds.
 pref("network.sts.pollable_event_timeout", 6);
 
-// Start a separate socket process. Performing networking on the socket process
-// is control by a sepparate pref
-// ("network.http.network_access_on_socket_process.enabled").
-// Changing these prefs requires a restart.
-pref("network.process.enabled", false);
-
 // Enable/disable sni encryption.
 pref("network.security.esni.enabled", false);
 
 // 2147483647 == PR_INT32_MAX == ~2 GB
 pref("network.websocket.max-message-size", 2147483647);
 
 // Should we automatically follow http 3xx redirects during handshake
 pref("network.websocket.auto-follow-http-redirects", false);
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -49,18 +49,16 @@
 #include "mozilla/ipc/URIUtils.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/net/NeckoParent.h"
 #include "mozilla/dom/ClientInfo.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ServiceWorkerDescriptor.h"
 #include "mozilla/net/CaptivePortalService.h"
 #include "mozilla/net/NetworkConnectivityService.h"
-#include "mozilla/net/SocketProcessHost.h"
-#include "mozilla/net/SocketProcessParent.h"
 #include "mozilla/Unused.h"
 #include "ReferrerPolicy.h"
 #include "nsContentSecurityManager.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
 namespace net {
 
@@ -75,17 +73,16 @@ using mozilla::dom::ServiceWorkerDescrip
 
 // Nb: these have been misnomers since bug 715770 removed the buffer cache.
 // "network.segment.count" and "network.segment.size" would be better names,
 // but the old names are still used to preserve backward compatibility.
 #define NECKO_BUFFER_CACHE_COUNT_PREF "network.buffer.cache.count"
 #define NECKO_BUFFER_CACHE_SIZE_PREF "network.buffer.cache.size"
 #define NETWORK_NOTIFY_CHANGED_PREF "network.notify.changed"
 #define NETWORK_CAPTIVE_PORTAL_PREF "network.captive-portal-service.enabled"
-#define WEBRTC_PREF_PREFIX "media.peerconnection."
 
 #define MAX_RECURSION_COUNT 50
 
 nsIOService *gIOService;
 static bool gHasWarnedUploadChannel2;
 static bool gCaptivePortalEnabled = false;
 static LazyLogModule gIOServiceLog("nsIOService");
 #undef LOG
@@ -187,46 +184,39 @@ bool nsIOService::sBlockFTPSubresources 
 nsIOService::nsIOService()
     : mOffline(true),
       mOfflineForProfileChange(false),
       mManageLinkStatus(false),
       mConnectivity(true),
       mOfflineMirrorsConnectivity(true),
       mSettingOffline(false),
       mSetOfflineValue(false),
-      mSocketProcessLaunchComplete(false),
       mShutdown(false),
       mHttpHandlerAlreadyShutingDown(false),
       mNetworkLinkServiceInitialized(false),
       mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY),
       mNetworkNotifyChanged(true),
       mTotalRequests(0),
       mCacheWon(0),
       mNetWon(0),
       mLastOfflineStateChange(PR_IntervalNow()),
       mLastConnectivityChange(PR_IntervalNow()),
       mLastNetworkLinkChange(PR_IntervalNow()),
-      mNetTearingDownStarted(0),
-      mSocketProcess(nullptr) {}
+      mNetTearingDownStarted(0) {}
 
 static const char *gCallbackPrefs[] = {
     PORT_PREF_PREFIX,
     MANAGE_OFFLINE_STATUS_PREF,
     NECKO_BUFFER_CACHE_COUNT_PREF,
     NECKO_BUFFER_CACHE_SIZE_PREF,
     NETWORK_NOTIFY_CHANGED_PREF,
     NETWORK_CAPTIVE_PORTAL_PREF,
     nullptr,
 };
 
-static const char *gCallbackPrefsForSocketProcess[] = {
-    WEBRTC_PREF_PREFIX,
-    nullptr,
-};
-
 nsresult nsIOService::Init() {
   // XXX hack until xpidl supports error info directly (bug 13423)
   nsCOMPtr<nsIErrorService> errorService = nsErrorService::GetOrCreate();
   MOZ_ALWAYS_TRUE(errorService);
   errorService->RegisterErrorStringBundle(NS_ERROR_MODULE_NETWORK,
                                           NECKO_MSGS_URL);
 
   InitializeCaptivePortalService();
@@ -244,17 +234,16 @@ nsresult nsIOService::Init() {
   nsCOMPtr<nsIObserverService> observerService = services::GetObserverService();
   if (observerService) {
     observerService->AddObserver(this, kProfileChangeNetTeardownTopic, true);
     observerService->AddObserver(this, kProfileChangeNetRestoreTopic, true);
     observerService->AddObserver(this, kProfileDoChange, true);
     observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, true);
     observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, true);
     observerService->AddObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC, true);
-    observerService->AddObserver(this, NS_PREFSERVICE_READ_TOPIC_ID, true);
   } else
     NS_WARNING("failed to get observer service");
 
   Preferences::AddBoolVarCache(&sIsDataURIUniqueOpaqueOrigin,
                                "security.data_uri.unique_opaque_origin", false);
   Preferences::AddBoolVarCache(
       &sBlockToplevelDataUriNavigations,
       "security.data_uri.block_toplevel_data_uri_navigations", false);
@@ -362,156 +351,16 @@ already_AddRefed<nsIOService> nsIOServic
     if (NS_SUCCEEDED(ios->Init())) {
       MOZ_ASSERT(gIOService == ios.get());
       return ios.forget();
     }
   }
   return do_AddRef(gIOService);
 }
 
-class SocketProcessListenerProxy : public SocketProcessHost::Listener {
- public:
-  SocketProcessListenerProxy() = default;
-  void OnProcessLaunchComplete(SocketProcessHost *aHost, bool aSucceeded) {
-    if (!gIOService) {
-      return;
-    }
-
-    gIOService->OnProcessLaunchComplete(aHost, aSucceeded);
-  }
-
-  void OnProcessUnexpectedShutdown(SocketProcessHost *aHost) {
-    if (!gIOService) {
-      return;
-    }
-
-    gIOService->OnProcessUnexpectedShutdown(aHost);
-  }
-};
-
-nsresult nsIOService::LaunchSocketProcess() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (XRE_GetProcessType() != GeckoProcessType_Default) {
-    return NS_OK;
-  }
-
-  if (mSocketProcess) {
-    return NS_OK;
-  }
-
-  if (!Preferences::GetBool("network.process.enabled", true)) {
-    LOG(("nsIOService skipping LaunchSocketProcess because of the pref"));
-    return NS_OK;
-  }
-
-  Preferences::RegisterPrefixCallbacks(
-      PREF_CHANGE_METHOD(nsIOService::NotifySocketProcessPrefsChanged),
-      gCallbackPrefsForSocketProcess, this);
-
-  // The subprocess is launched asynchronously, so we wait for a callback to
-  // acquire the IPDL actor.
-  mSocketProcess = new SocketProcessHost(new SocketProcessListenerProxy());
-  LOG(("nsIOService::LaunchSocketProcess"));
-  if (!mSocketProcess->Launch()) {
-    NS_WARNING("Failed to launch socket process!!");
-    DestroySocketProcess();
-    return NS_ERROR_FAILURE;
-  }
-
-  return NS_OK;
-}
-
-void nsIOService::DestroySocketProcess() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (XRE_GetProcessType() != GeckoProcessType_Default || !mSocketProcess) {
-    return;
-  }
-
-  Preferences::UnregisterPrefixCallbacks(
-      PREF_CHANGE_METHOD(nsIOService::NotifySocketProcessPrefsChanged),
-      gCallbackPrefsForSocketProcess, this);
-
-  mSocketProcess->Shutdown();
-  mSocketProcess = nullptr;
-}
-
-bool nsIOService::SocketProcessReady() {
-  return mSocketProcess && mSocketProcess->IsConnected();
-}
-
-void nsIOService::NotifySocketProcessPrefsChanged(const char *aName) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!XRE_IsParentProcess()) {
-    return;
-  }
-
-  dom::Pref pref(nsCString(aName), /* isLocked */ false, null_t(), null_t());
-  Preferences::GetPreference(&pref);
-  auto sendPrefUpdate = [pref]() {
-    Unused << gIOService->mSocketProcess->GetActor()->SendPreferenceUpdate(pref);
-  };
-  CallOrWaitForSocketProcess(sendPrefUpdate);
-}
-
-void nsIOService::OnProcessLaunchComplete(SocketProcessHost *aHost,
-                                          bool aSucceeded) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  LOG(("nsIOService::OnProcessLaunchComplete aSucceeded=%d\n", aSucceeded));
-
-  mSocketProcessLaunchComplete = true;
-
-  if (mShutdown || !SocketProcessReady()) {
-    return;
-  }
-
-  if (!mPendingEvents.IsEmpty()) {
-    nsTArray<std::function<void()>> pendingEvents;
-    mPendingEvents.SwapElements(pendingEvents);
-    for (auto& func : pendingEvents) {
-      func();
-    }
-  }
-}
-
-void nsIOService::CallOrWaitForSocketProcess(const std::function<void()>& aFunc) {
-  MOZ_ASSERT(NS_IsMainThread());
-  if (IsSocketProcessLaunchComplete() && SocketProcessReady()) {
-    aFunc();
-  } else {
-    mPendingEvents.AppendElement(aFunc);  // infallible
-  }
-}
-
-bool nsIOService::IsSocketProcessLaunchComplete() {
-  MOZ_ASSERT(NS_IsMainThread());
-  return mSocketProcessLaunchComplete;
-}
-
-void nsIOService::OnProcessUnexpectedShutdown(SocketProcessHost *aHost) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  LOG(("nsIOService::OnProcessUnexpectedShutdown\n"));
-  DestroySocketProcess();
-}
-
-RefPtr<MemoryReportingProcess> nsIOService::GetSocketProcessMemoryReporter() {
-  // Check the prefs here again, since we don't want to create
-  // SocketProcessMemoryReporter for some tests.
-  if (!Preferences::GetBool("network.process.enabled") || !SocketProcessReady()) {
-    return nullptr;
-
-  }
-
-  return new SocketProcessMemoryReporter();
-}
-
 NS_IMPL_ISUPPORTS(nsIOService, nsIIOService, nsINetUtil, nsISpeculativeConnect,
                   nsIObserver, nsIIOServiceInternal, nsISupportsWeakReference)
 
 ////////////////////////////////////////////////////////////////////////////////
 
 nsresult nsIOService::RecheckCaptivePortal() {
   MOZ_ASSERT(NS_IsMainThread(), "Must be called on the main thread");
   if (!mCaptivePortalService) {
@@ -1405,37 +1254,31 @@ nsIOService::Observe(nsISupports *subjec
       SetOffline(true);
     }
   } else if (!strcmp(topic, kProfileChangeNetRestoreTopic)) {
     if (mOfflineForProfileChange) {
       mOfflineForProfileChange = false;
       SetOffline(false);
     }
   } else if (!strcmp(topic, kProfileDoChange)) {
-    if (!data) {
-      return NS_OK;
-    }
-    if (NS_LITERAL_STRING("startup").Equals(data)) {
+    if (data && NS_LITERAL_STRING("startup").Equals(data)) {
       // Lazy initialization of network link service (see bug 620472)
       InitializeNetworkLinkService();
       // Set up the initilization flag regardless the actuall result.
       // If we fail here, we will fail always on.
       mNetworkLinkServiceInitialized = true;
 
       // And now reflect the preference setting
       PrefsChanged(MANAGE_OFFLINE_STATUS_PREF);
 
       // Bug 870460 - Read cookie database at an early-as-possible time
       // off main thread. Hence, we have more chance to finish db query
       // before something calls into the cookie service.
       nsCOMPtr<nsISupports> cookieServ =
           do_GetService(NS_COOKIESERVICE_CONTRACTID);
-    } else if (NS_LITERAL_STRING("xpcshell-do-get-profile").Equals(data)) {
-      // xpcshell doesn't read user profile.
-      LaunchSocketProcess();
     }
   } else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
     // Remember we passed XPCOM shutdown notification to prevent any
     // changes of the offline status from now. We must not allow going
     // online after this point.
     mShutdown = true;
 
     if (!mHttpHandlerAlreadyShutingDown && !mOfflineForProfileChange) {
@@ -1445,29 +1288,24 @@ nsIOService::Observe(nsISupports *subjec
 
     SetOffline(true);
 
     if (mCaptivePortalService) {
       static_cast<CaptivePortalService *>(mCaptivePortalService.get())->Stop();
       mCaptivePortalService = nullptr;
     }
 
-    DestroySocketProcess();
   } else if (!strcmp(topic, NS_NETWORK_LINK_TOPIC)) {
     OnNetworkLinkEvent(NS_ConvertUTF16toUTF8(data).get());
   } else if (!strcmp(topic, NS_WIDGET_WAKE_OBSERVER_TOPIC)) {
     // coming back alive from sleep
     // this indirection brought to you by:
     // https://bugzilla.mozilla.org/show_bug.cgi?id=1152048#c19
     nsCOMPtr<nsIRunnable> wakeupNotifier = new nsWakeupNotifier(this);
     NS_DispatchToMainThread(wakeupNotifier);
-  } else if (!strcmp(topic, NS_PREFSERVICE_READ_TOPIC_ID)) {
-    // Launch socket process after we load user's pref. This is to make sure
-    // that socket process can get the latest prefs.
-    LaunchSocketProcess();
   }
 
   return NS_OK;
 }
 
 // nsINetUtil interface
 NS_IMETHODIMP
 nsIOService::ParseRequestContentType(const nsACString &aTypeHeader,
@@ -1558,17 +1396,17 @@ nsIOService::SetManageOfflineStatus(bool
 NS_IMETHODIMP
 nsIOService::GetManageOfflineStatus(bool *aManage) {
   *aManage = mManageLinkStatus;
   return NS_OK;
 }
 
 // input argument 'data' is already UTF8'ed
 nsresult nsIOService::OnNetworkLinkEvent(const char *data) {
-  if (IsNeckoChild() || IsSocketProcessChild()) {
+  if (IsNeckoChild()) {
     // There is nothing IO service could do on the child process
     // with this at the moment.  Feel free to add functionality
     // here at will, though.
     return NS_OK;
   }
 
   if (mShutdown) {
     return NS_ERROR_NOT_AVAILABLE;
--- a/netwerk/base/nsIOService.h
+++ b/netwerk/base/nsIOService.h
@@ -40,22 +40,19 @@ static const char gForcedExternalSchemes
 
 class nsINetworkLinkService;
 class nsIPrefBranch;
 class nsIProtocolProxyService2;
 class nsIProxyInfo;
 class nsPISocketTransportService;
 
 namespace mozilla {
-class MemoryReportingProcess;
 namespace net {
 class NeckoChild;
 class nsAsyncRedirectVerifyHelper;
-class SocketProcessHost;
-class SocketProcessMemoryReporter;
 
 class nsIOService final : public nsIIOService,
                           public nsIObserver,
                           public nsINetUtil,
                           public nsISpeculativeConnect,
                           public nsSupportsWeakReference,
                           public nsIIOServiceInternal {
  public:
@@ -111,31 +108,16 @@ class nsIOService final : public nsIIOSe
   void IncrementCacheWonRequestNumber() { mCacheWon++; }
   uint32_t GetCacheWonRequestNumber() { return mCacheWon; }
   void IncrementNetWonRequestNumber() { mNetWon++; }
   uint32_t GetNetWonRequestNumber() { return mNetWon; }
 
   // Used to trigger a recheck of the captive portal status
   nsresult RecheckCaptivePortal();
 
-  void OnProcessLaunchComplete(SocketProcessHost* aHost, bool aSucceeded);
-  void OnProcessUnexpectedShutdown(SocketProcessHost* aHost);
-  bool SocketProcessReady();
-  void NotifySocketProcessPrefsChanged(const char* aName);
-
-  bool IsSocketProcessLaunchComplete();
-
-  // Call func immediately if socket process is launched completely. Otherwise,
-  // |func| will be queued and then executed in the *main thread* once socket
-  // process is launced.
-  void CallOrWaitForSocketProcess(const std::function<void()>& aFunc);
-
-  friend SocketProcessMemoryReporter;
-  RefPtr<MemoryReportingProcess> GetSocketProcessMemoryReporter();
-
  private:
   // These shouldn't be called directly:
   // - construct using GetInstance
   // - destroy using Release
   nsIOService();
   ~nsIOService();
   nsresult SetConnectivityInternal(bool aConnectivity);
 
@@ -175,35 +157,30 @@ class nsIOService final : public nsIIOSe
                                                    uint32_t aProxyFlags,
                                                    nsILoadInfo* aLoadInfo,
                                                    nsIChannel** result);
 
   nsresult SpeculativeConnectInternal(nsIURI* aURI, nsIPrincipal* aPrincipal,
                                       nsIInterfaceRequestor* aCallbacks,
                                       bool aAnonymous);
 
-  nsresult LaunchSocketProcess();
-  void DestroySocketProcess();
-
  private:
   bool mOffline;
   mozilla::Atomic<bool, mozilla::Relaxed> mOfflineForProfileChange;
   bool mManageLinkStatus;
   bool mConnectivity;
   // If true, the connectivity state will be mirrored by IOService.offline
   // meaning if !mConnectivity, GetOffline() will return true
   bool mOfflineMirrorsConnectivity;
 
   // Used to handle SetOffline() reentrancy.  See the comment in
   // SetOffline() for more details.
   bool mSettingOffline;
   bool mSetOfflineValue;
 
-  bool mSocketProcessLaunchComplete;
-
   mozilla::Atomic<bool, mozilla::Relaxed> mShutdown;
   mozilla::Atomic<bool, mozilla::Relaxed> mHttpHandlerAlreadyShutingDown;
 
   nsCOMPtr<nsPISocketTransportService> mSocketTransportService;
   nsCOMPtr<nsICaptivePortalService> mCaptivePortalService;
   nsCOMPtr<nsINetworkLinkService> mNetworkLinkService;
   bool mNetworkLinkServiceInitialized;
 
@@ -232,23 +209,16 @@ class nsIOService final : public nsIIOSe
   // change has happened shortly before.
   mozilla::Atomic<PRIntervalTime> mLastOfflineStateChange;
   mozilla::Atomic<PRIntervalTime> mLastConnectivityChange;
   mozilla::Atomic<PRIntervalTime> mLastNetworkLinkChange;
 
   // Time a network tearing down started.
   mozilla::Atomic<PRIntervalTime> mNetTearingDownStarted;
 
-  SocketProcessHost* mSocketProcess;
-
-  // Events should be executed after the socket process is launched. Will
-  // dispatch these events while socket process fires OnProcessLaunchComplete.
-  // Note: this array is accessed only on the main thread.
-  nsTArray<std::function<void()>> mPendingEvents;
-
  public:
   // Used for all default buffer sizes that necko allocates.
   static uint32_t gDefaultSegmentSize;
   static uint32_t gDefaultSegmentCount;
 };
 
 /**
  * Reference to the IO service singleton. May be null.
--- a/netwerk/ipc/NeckoCommon.h
+++ b/netwerk/ipc/NeckoCommon.h
@@ -90,21 +90,16 @@ inline bool IsNeckoChild() {
   if (!didCheck) {
     didCheck = true;
     amChild = (XRE_GetProcessType() == GeckoProcessType_Content) &&
               !recordreplay::IsMiddleman();
   }
   return amChild;
 }
 
-inline bool IsSocketProcessChild() {
-  static bool amChild = (XRE_GetProcessType() == GeckoProcessType_Socket);
-  return amChild;
-}
-
 namespace NeckoCommonInternal {
 extern bool gSecurityDisabled;
 extern bool gRegisteredBool;
 }  // namespace NeckoCommonInternal
 
 // This should always return true unless xpcshell tests are being used
 inline bool UsingNeckoIPCSecurity() {
   return !NeckoCommonInternal::gSecurityDisabled;
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -23,18 +23,16 @@
 #include "mozilla/net/AltDataOutputStreamParent.h"
 #include "mozilla/Unused.h"
 #include "mozilla/net/FileChannelParent.h"
 #include "mozilla/net/DNSRequestParent.h"
 #include "mozilla/net/ChannelDiverterParent.h"
 #include "mozilla/net/IPCTransportProvider.h"
 #include "mozilla/net/RequestContextService.h"
 #include "mozilla/net/TrackingDummyChannelParent.h"
-#include "mozilla/net/SocketProcessParent.h"
-#include "mozilla/net/PSocketProcessBridgeParent.h"
 #ifdef MOZ_WEBRTC
 #include "mozilla/net/StunAddrsRequestParent.h"
 #include "mozilla/net/WebrtcProxyChannelParent.h"
 #endif
 #include "mozilla/dom/ChromeUtils.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/TabContext.h"
 #include "mozilla/dom/TabParent.h"
@@ -71,17 +69,17 @@ using mozilla::ipc::PrincipalInfo;
 using mozilla::net::PTCPServerSocketParent;
 using mozilla::net::PTCPSocketParent;
 using mozilla::net::PUDPSocketParent;
 
 namespace mozilla {
 namespace net {
 
 // C++ file contents
-NeckoParent::NeckoParent() : mSocketProcessBridgeInited(false) {
+NeckoParent::NeckoParent() {
   // Init HTTP protocol handler now since we need atomTable up and running very
   // early (IPDL argument handling for PHttpChannel constructor needs it) so
   // normal init (during 1st Http channel request) isn't early enough.
   nsCOMPtr<nsIProtocolHandler> proto =
       do_GetService("@mozilla.org/network/protocol;1?name=http");
 
   // only register once--we will have multiple NeckoParents if there are
   // multiple child processes.
@@ -951,46 +949,10 @@ mozilla::ipc::IPCResult NeckoParent::Rec
 bool NeckoParent::DeallocPTrackingDummyChannelParent(
     PTrackingDummyChannelParent* aActor) {
   RefPtr<TrackingDummyChannelParent> c =
       dont_AddRef(static_cast<TrackingDummyChannelParent*>(aActor));
   MOZ_ASSERT(c);
   return true;
 }
 
-mozilla::ipc::IPCResult NeckoParent::RecvInitSocketProcessBridge(
-    InitSocketProcessBridgeResolver&& aResolver) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  Endpoint<PSocketProcessBridgeChild> invalidEndpoint;
-  if (NS_WARN_IF(mSocketProcessBridgeInited)) {
-    aResolver(std::move(invalidEndpoint));
-    return IPC_OK();
-  }
-
-  SocketProcessParent* parent = SocketProcessParent::GetSingleton();
-  if (NS_WARN_IF(!parent)) {
-    aResolver(std::move(invalidEndpoint));
-    return IPC_OK();
-  }
-
-  Endpoint<PSocketProcessBridgeParent> parentEndpoint;
-  Endpoint<PSocketProcessBridgeChild> childEndpoint;
-  if (NS_WARN_IF(NS_FAILED(PSocketProcessBridge::CreateEndpoints(
-          parent->OtherPid(), Manager()->OtherPid(), &parentEndpoint,
-          &childEndpoint)))) {
-    aResolver(std::move(invalidEndpoint));
-    return IPC_OK();
-  }
-
-  if (NS_WARN_IF(!parent->SendInitSocketProcessBridgeParent(
-          Manager()->OtherPid(), std::move(parentEndpoint)))) {
-    aResolver(std::move(invalidEndpoint));
-    return IPC_OK();
-  }
-
-  aResolver(std::move(childEndpoint));
-  mSocketProcessBridgeInited = true;
-  return IPC_OK();
-}
-
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/ipc/NeckoParent.h
+++ b/netwerk/ipc/NeckoParent.h
@@ -82,18 +82,16 @@ class NeckoParent : public PNeckoParent 
                                nsICancelable**) override;
 
    protected:
     PNeckoParent* mNeckoParent;
     TabId mNestedFrameId;
   };
 
  protected:
-  bool mSocketProcessBridgeInited;
-
   virtual PHttpChannelParent* AllocPHttpChannelParent(
       const PBrowserOrId&, const SerializedLoadContext&,
       const HttpChannelCreationArgs& aOpenArgs) override;
   virtual mozilla::ipc::IPCResult RecvPHttpChannelConstructor(
       PHttpChannelParent* aActor, const PBrowserOrId& aBrowser,
       const SerializedLoadContext& aSerialized,
       const HttpChannelCreationArgs& aOpenArgs) override;
   virtual bool DeallocPHttpChannelParent(PHttpChannelParent*) override;
@@ -243,17 +241,14 @@ class NeckoParent : public PNeckoParent 
 
   virtual bool DeallocPTrackingDummyChannelParent(
       PTrackingDummyChannelParent* aChild) override;
 
   virtual mozilla::ipc::IPCResult RecvPTrackingDummyChannelConstructor(
       PTrackingDummyChannelParent* aActor, nsIURI* aURI, nsIURI* aTopWindowURI,
       const nsresult& aTopWindowURIResult,
       const OptionalLoadInfoArgs& aLoadInfo) override;
-
-  virtual mozilla::ipc::IPCResult RecvInitSocketProcessBridge(
-      InitSocketProcessBridgeResolver&& aResolver) override;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_NeckoParent_h
--- a/netwerk/ipc/PNecko.ipdl
+++ b/netwerk/ipc/PNecko.ipdl
@@ -23,17 +23,16 @@ include protocol PDataChannel;
 include protocol PSimpleChannel;
 include protocol PTransportProvider;
 include protocol PChildToParentStream; //FIXME: bug #792908
 include protocol PParentToChildStream; //FIXME: bug #792908
 include protocol PStunAddrsRequest;
 include protocol PFileChannel;
 include protocol PTrackingDummyChannel;
 include protocol PWebrtcProxyChannel;
-include protocol PSocketProcessBridge;
 
 include IPCStream;
 include URIParams;
 include NeckoChannelParams;
 include PBrowserOrId;
 include protocol PAltDataOutputStream;
 
 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
@@ -139,19 +138,16 @@ parent:
   async PWebrtcProxyChannel(PBrowserOrId browser);
 
   /**
    * WebExtension-specific remote resource loading
    */
   async GetExtensionStream(URIParams uri) returns (nsIInputStream stream);
   async GetExtensionFD(URIParams uri) returns (FileDescriptor fd);
 
-  async InitSocketProcessBridge()
-    returns (Endpoint<PSocketProcessBridgeChild> endpoint);
-
 child:
   /*
    * Bring up the http auth prompt for a nested remote mozbrowser.
    * NestedFrameId is the id corresponding to the PBrowser.  It is the same id
    * that was passed to the PBrowserOrId param in to the PHttpChannel constructor
    */
   async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
                                       nsString realm, uint64_t callbackId);
deleted file mode 100644
--- a/netwerk/ipc/PSocketProcess.ipdl
+++ /dev/null
@@ -1,49 +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 MemoryReportTypes;
-include protocol PSocketProcessBridge;
-include protocol PProfiler;
-include PrefsTypes;
-
-using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
-using mozilla::Telemetry::HistogramAccumulation from "mozilla/TelemetryComms.h";
-using mozilla::Telemetry::KeyedHistogramAccumulation from "mozilla/TelemetryComms.h";
-using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
-using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
-using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
-using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
-using base::ProcessId from "base/process.h";
-
-namespace mozilla {
-namespace net {
-
-protocol PSocketProcess
-{
-parent:
-  async InitCrashReporter(Shmem shmem, NativeThreadId threadId);
-  async AddMemoryReport(MemoryReport aReport);
-  async FinishMemoryReport(uint32_t aGeneration);
-  // Messages for sending telemetry to parent process.
-  async AccumulateChildHistograms(HistogramAccumulation[] accumulations);
-  async AccumulateChildKeyedHistograms(KeyedHistogramAccumulation[] accumulations);
-  async UpdateChildScalars(ScalarAction[] actions);
-  async UpdateChildKeyedScalars(KeyedScalarAction[] actions);
-  async RecordChildEvents(ChildEventData[] events);
-  async RecordDiscardedData(DiscardedData data);
-
-child:
-  async PreferenceUpdate(Pref pref);
-  async RequestMemoryReport(uint32_t generation,
-                            bool anonymize,
-                            bool minimizeMemoryUsage,
-                            MaybeFileDesc DMDFile);
-  async SetOffline(bool offline);
-  async InitSocketProcessBridgeParent(ProcessId processId, Endpoint<PSocketProcessBridgeParent> endpoint);
-  async InitProfiler(Endpoint<PProfilerChild> aEndpoint);
-};
-
-} // namespace net
-} // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/PSocketProcessBridge.ipdl
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=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 protocol PBackground;
-
-namespace mozilla {
-namespace net {
-
-/**
-  * PSocketProcessBridge is the IPC protocol between content process and
-  * socket process. This protocol allows socket process to send data to
-  * content process bypassing parent process.
-  * Once created, PSocketProcessBridgeChild is the actor that lives in
-  * content process and PSocketProcessBridgeParent lives in
-  * socket process.
-  */
-nested(upto inside_cpow) sync protocol PSocketProcessBridge
-{
-parent:
-  async InitBackground(Endpoint<PBackgroundParent> aEndpoint);
-
-both:
-  async Test();
-};
-
-}
-}
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessBridgeChild.cpp
+++ /dev/null
@@ -1,137 +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 "SocketProcessBridgeChild.h"
-#include "SocketProcessLogging.h"
-
-#include "mozilla/net/NeckoChild.h"
-#include "nsIObserverService.h"
-#include "nsThreadUtils.h"
-
-namespace mozilla {
-namespace net {
-
-StaticRefPtr<SocketProcessBridgeChild>
-    SocketProcessBridgeChild::sSocketProcessBridgeChild;
-
-NS_IMPL_ISUPPORTS(SocketProcessBridgeChild, nsIObserver)
-
-// static
-bool SocketProcessBridgeChild::Create(
-    Endpoint<PSocketProcessBridgeChild>&& aEndpoint) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  sSocketProcessBridgeChild =
-      new SocketProcessBridgeChild(std::move(aEndpoint));
-  if (sSocketProcessBridgeChild->Inited()) {
-    return true;
-  }
-
-  sSocketProcessBridgeChild = nullptr;
-  return false;
-}
-
-// static
-already_AddRefed<SocketProcessBridgeChild>
-SocketProcessBridgeChild::GetSingleton() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!sSocketProcessBridgeChild) {
-    return nullptr;
-  }
-
-  RefPtr<SocketProcessBridgeChild> child = sSocketProcessBridgeChild.get();
-  return child.forget();
-}
-
-// static
-void SocketProcessBridgeChild::EnsureSocketProcessBridge(
-    std::function<void()>&& aOnSuccess, std::function<void()>&& aOnFailure) {
-  MOZ_ASSERT(IsNeckoChild() && gNeckoChild);
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!gNeckoChild) {
-    aOnFailure();
-    return;
-  }
-
-  if (sSocketProcessBridgeChild) {
-    aOnSuccess();
-    return;
-  }
-
-  gNeckoChild->SendInitSocketProcessBridge()->Then(
-      GetMainThreadSerialEventTarget(), __func__,
-      [onSuccess = std::move(aOnSuccess), onFailure = std::move(aOnFailure)](
-          Endpoint<PSocketProcessBridgeChild>&& aEndpoint) {
-        if (aEndpoint.IsValid()) {
-          if (SocketProcessBridgeChild::Create(std::move(aEndpoint))) {
-            onSuccess();
-            return;
-          }
-        }
-        onFailure();
-      },
-      [onFailure = std::move(aOnFailure)](
-          const mozilla::ipc::ResponseRejectReason) { onFailure(); });
-}
-
-SocketProcessBridgeChild::SocketProcessBridgeChild(
-    Endpoint<PSocketProcessBridgeChild>&& aEndpoint)
-    : mShuttingDown(false) {
-  LOG(("CONSTRUCT SocketProcessBridgeChild::SocketProcessBridgeChild\n"));
-
-  mInited = aEndpoint.Bind(this);
-  if (!mInited) {
-    MOZ_ASSERT(false, "Bind failed!");
-    return;
-  }
-
-  nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
-  if (os) {
-    os->AddObserver(this, "content-child-shutdown", false);
-  }
-
-  mSocketProcessPid = aEndpoint.OtherPid();
-}
-
-SocketProcessBridgeChild::~SocketProcessBridgeChild() {
-  LOG(("DESTRUCT SocketProcessBridgeChild::SocketProcessBridgeChild\n"));
-}
-
-mozilla::ipc::IPCResult SocketProcessBridgeChild::RecvTest() {
-  LOG(("SocketProcessBridgeChild::RecvTest\n"));
-  return IPC_OK();
-}
-
-void SocketProcessBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
-  LOG(("SocketProcessBridgeChild::ActorDestroy\n"));
-  nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
-  if (os) {
-    os->RemoveObserver(this, "content-child-shutdown");
-  }
-  MessageLoop::current()->PostTask(
-      NewRunnableMethod("net::SocketProcessBridgeChild::DeferredDestroy", this,
-                        &SocketProcessBridgeChild::DeferredDestroy));
-  mShuttingDown = true;
-}
-
-NS_IMETHODIMP
-SocketProcessBridgeChild::Observe(nsISupports* aSubject, const char* aTopic,
-                                  const char16_t* aData) {
-  if (!strcmp(aTopic, "content-child-shutdown")) {
-    PSocketProcessBridgeChild::Close();
-  }
-  return NS_OK;
-}
-
-void SocketProcessBridgeChild::DeferredDestroy() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  sSocketProcessBridgeChild = nullptr;
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessBridgeChild.h
+++ /dev/null
@@ -1,52 +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_net_SocketProcessBridgeChild_h
-#define mozilla_net_SocketProcessBridgeChild_h
-
-#include <functional>
-#include "mozilla/net/PSocketProcessBridgeChild.h"
-#include "nsIObserver.h"
-
-namespace mozilla {
-namespace net {
-
-// The IPC actor implements PSocketProcessBridgeChild in content process.
-// This is allocated and kept alive by NeckoChild. When "content-child-shutdown"
-// topic is observed, this actor will be destroyed.
-class SocketProcessBridgeChild final : public PSocketProcessBridgeChild,
-                                       public nsIObserver {
- public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
-
-  static bool Create(Endpoint<PSocketProcessBridgeChild>&& aEndpoint);
-  static already_AddRefed<SocketProcessBridgeChild> GetSingleton();
-  static void EnsureSocketProcessBridge(std::function<void()>&& aOnSuccess,
-                                        std::function<void()>&& aOnFailure);
-
-  mozilla::ipc::IPCResult RecvTest() override;
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-  void DeferredDestroy();
-  bool IsShuttingDown() const { return mShuttingDown; };
-  bool Inited() const { return mInited; };
-  ProcessId SocketProcessPid() const { return mSocketProcessPid; };
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(SocketProcessBridgeChild);
-  explicit SocketProcessBridgeChild(
-      Endpoint<PSocketProcessBridgeChild>&& aEndpoint);
-  virtual ~SocketProcessBridgeChild();
-
-  static StaticRefPtr<SocketProcessBridgeChild> sSocketProcessBridgeChild;
-  bool mShuttingDown;
-  bool mInited = false;
-  ProcessId mSocketProcessPid;
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessBridgeChild_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessBridgeParent.cpp
+++ /dev/null
@@ -1,60 +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 "SocketProcessBridgeParent.h"
-#include "SocketProcessLogging.h"
-
-#include "mozilla/ipc/BackgroundParent.h"
-#include "SocketProcessChild.h"
-
-namespace mozilla {
-namespace net {
-
-SocketProcessBridgeParent::SocketProcessBridgeParent(
-    ProcessId aId, Endpoint<PSocketProcessBridgeParent>&& aEndpoint)
-    : mId(aId) {
-  LOG((
-      "CONSTRUCT SocketProcessBridgeParent::SocketProcessBridgeParent mId=%d\n",
-      mId));
-  MOZ_COUNT_CTOR(SocketProcessBridgeParent);
-  DebugOnly<bool> ok = aEndpoint.Bind(this);
-  MOZ_ASSERT(ok);
-}
-
-SocketProcessBridgeParent::~SocketProcessBridgeParent() {
-  LOG(("DESTRUCT SocketProcessBridgeParent::SocketProcessBridgeParent\n"));
-  MOZ_COUNT_DTOR(SocketProcessBridgeParent);
-}
-
-mozilla::ipc::IPCResult SocketProcessBridgeParent::RecvTest() {
-  LOG(("SocketProcessBridgeParent::RecvTest\n"));
-  Unused << SendTest();
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessBridgeParent::RecvInitBackground(
-    Endpoint<PBackgroundParent>&& aEndpoint) {
-  LOG(("SocketProcessBridgeParent::RecvInitBackground mId=%d\n", mId));
-  if (!ipc::BackgroundParent::Alloc(nullptr, std::move(aEndpoint))) {
-    return IPC_FAIL(this, "BackgroundParent::Alloc failed");
-  }
-
-  return IPC_OK();
-}
-
-void SocketProcessBridgeParent::ActorDestroy(ActorDestroyReason aWhy) {
-  LOG(("SocketProcessBridgeParent::ActorDestroy mId=%d\n", mId));
-
-  MessageLoop::current()->PostTask(
-      NewRunnableMethod("net::SocketProcessBridgeParent::DeferredDestroy", this,
-                        &SocketProcessBridgeParent::DeferredDestroy));
-}
-
-void SocketProcessBridgeParent::DeferredDestroy() {
-  SocketProcessChild::GetSingleton()->DestroySocketProcessBridgeParent(mId);
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessBridgeParent.h
+++ /dev/null
@@ -1,41 +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_net_SocketProcessBridgeParent_h
-#define mozilla_net_SocketProcessBridgeParent_h
-
-#include "mozilla/net/PSocketProcessBridgeParent.h"
-
-namespace mozilla {
-namespace net {
-
-// The IPC actor implements PSocketProcessBridgeParent in socket process.
-// This is allocated and kept alive by SocketProcessChild. When |ActorDestroy|
-// is called, |SocketProcessChild::DestroySocketProcessBridgeParent| will be
-// called to destroy this actor.
-class SocketProcessBridgeParent final : public PSocketProcessBridgeParent {
- public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SocketProcessBridgeParent)
-
-  explicit SocketProcessBridgeParent(
-      ProcessId aId, Endpoint<PSocketProcessBridgeParent>&& aEndpoint);
-
-  mozilla::ipc::IPCResult RecvTest() override;
-  mozilla::ipc::IPCResult RecvInitBackground(
-      Endpoint<PBackgroundParent>&& aEndpoint) override;
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-  void DeferredDestroy();
-
- private:
-  ~SocketProcessBridgeParent();
-
-  ProcessId mId;
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessBridgeParent_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessChild.cpp
+++ /dev/null
@@ -1,161 +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 "SocketProcessChild.h"
-#include "SocketProcessLogging.h"
-
-#include "base/task.h"
-#include "mozilla/Assertions.h"
-#include "mozilla/dom/MemoryReportRequest.h"
-#include "mozilla/ipc/CrashReporterClient.h"
-#include "mozilla/ipc/ProcessChild.h"
-#include "mozilla/Preferences.h"
-#include "nsDebugImpl.h"
-#include "nsThreadManager.h"
-#include "ProcessUtils.h"
-#include "SocketProcessBridgeParent.h"
-
-#ifdef MOZ_GECKO_PROFILER
-#include "ChildProfilerController.h"
-#endif
-
-namespace mozilla {
-namespace net {
-
-using namespace ipc;
-
-static SocketProcessChild* sSocketProcessChild;
-
-SocketProcessChild::SocketProcessChild() {
-  LOG(("CONSTRUCT SocketProcessChild::SocketProcessChild\n"));
-  nsDebugImpl::SetMultiprocessMode("Socket");
-
-  MOZ_COUNT_CTOR(SocketProcessChild);
-  sSocketProcessChild = this;
-}
-
-SocketProcessChild::~SocketProcessChild() {
-  LOG(("DESTRUCT SocketProcessChild::SocketProcessChild\n"));
-  MOZ_COUNT_DTOR(SocketProcessChild);
-  sSocketProcessChild = nullptr;
-}
-
-/* static */ SocketProcessChild* SocketProcessChild::GetSingleton() {
-  return sSocketProcessChild;
-}
-
-bool SocketProcessChild::Init(base::ProcessId aParentPid,
-                              const char* aParentBuildID, MessageLoop* aIOLoop,
-                              IPC::Channel* aChannel) {
-  if (NS_WARN_IF(NS_FAILED(nsThreadManager::get().Init()))) {
-    return false;
-  }
-  if (NS_WARN_IF(!Open(aChannel, aParentPid, aIOLoop))) {
-    return false;
-  }
-  // This must be sent before any IPDL message, which may hit sentinel
-  // errors due to parent and content processes having different
-  // versions.
-  MessageChannel* channel = GetIPCChannel();
-  if (channel && !channel->SendBuildIDsMatchMessage(aParentBuildID)) {
-    // We need to quit this process if the buildID doesn't match the parent's.
-    // This can occur when an update occurred in the background.
-    ProcessChild::QuickExit();
-  }
-
-  // Init crash reporter support.
-  CrashReporterClient::InitSingleton(this);
-
-  SetThisProcessName("Socket Process");
-  return true;
-}
-
-void SocketProcessChild::ActorDestroy(ActorDestroyReason aWhy) {
-  LOG(("SocketProcessChild::ActorDestroy\n"));
-
-  if (AbnormalShutdown == aWhy) {
-    NS_WARNING("Shutting down Socket process early due to a crash!");
-    ProcessChild::QuickExit();
-  }
-
-#ifdef MOZ_GECKO_PROFILER
-  if (mProfilerController) {
-    mProfilerController->Shutdown();
-    mProfilerController = nullptr;
-  }
-#endif
-
-  CrashReporterClient::DestroySingleton();
-  XRE_ShutdownChildProcess();
-}
-
-void SocketProcessChild::CleanUp() {
-  LOG(("SocketProcessChild::CleanUp\n"));
-
-  NS_ShutdownXPCOM(nullptr);
-}
-
-IPCResult SocketProcessChild::RecvPreferenceUpdate(const Pref& aPref) {
-  Preferences::SetPreference(aPref);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessChild::RecvRequestMemoryReport(
-    const uint32_t& aGeneration, const bool& aAnonymize,
-    const bool& aMinimizeMemoryUsage, const MaybeFileDesc& aDMDFile) {
-  nsPrintfCString processName("SocketProcess");
-
-  mozilla::dom::MemoryReportRequestClient::Start(
-      aGeneration, aAnonymize, aMinimizeMemoryUsage, aDMDFile, processName,
-      [&](const MemoryReport& aReport) {
-        Unused << GetSingleton()->SendAddMemoryReport(aReport);
-      },
-      [&](const uint32_t& aGeneration) {
-        return GetSingleton()->SendFinishMemoryReport(aGeneration);
-      });
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessChild::RecvSetOffline(
-    const bool& aOffline) {
-  LOG(("SocketProcessChild::RecvSetOffline aOffline=%d\n", aOffline));
-
-  nsCOMPtr<nsIIOService> io(do_GetIOService());
-  NS_ASSERTION(io, "IO Service can not be null");
-
-  io->SetOffline(aOffline);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessChild::RecvInitSocketProcessBridgeParent(
-    const ProcessId& aContentProcessId,
-    Endpoint<mozilla::net::PSocketProcessBridgeParent>&& aEndpoint) {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!mSocketProcessBridgeParentMap.Get(aContentProcessId, nullptr));
-
-  mSocketProcessBridgeParentMap.Put(
-      aContentProcessId,
-      new SocketProcessBridgeParent(aContentProcessId, std::move(aEndpoint)));
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessChild::RecvInitProfiler(
-    Endpoint<PProfilerChild>&& aEndpoint) {
-#ifdef MOZ_GECKO_PROFILER
-  mProfilerController =
-      mozilla::ChildProfilerController::Create(std::move(aEndpoint));
-#endif
-  return IPC_OK();
-}
-
-void SocketProcessChild::DestroySocketProcessBridgeParent(ProcessId aId) {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mSocketProcessBridgeParentMap.Remove(aId);
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessChild.h
+++ /dev/null
@@ -1,63 +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_net_SocketProcessChild_h
-#define mozilla_net_SocketProcessChild_h
-
-#include "mozilla/net/PSocketProcessChild.h"
-#include "nsRefPtrHashtable.h"
-
-namespace mozilla {
-class ChildProfilerController;
-}
-
-namespace mozilla {
-namespace net {
-
-class SocketProcessBridgeParent;
-
-// The IPC actor implements PSocketProcessChild in child process.
-// This is allocated and kept alive by SocketProcessImpl.
-class SocketProcessChild final : public PSocketProcessChild {
- public:
-  SocketProcessChild();
-  ~SocketProcessChild();
-
-  static SocketProcessChild* GetSingleton();
-
-  bool Init(base::ProcessId aParentPid, const char* aParentBuildID,
-            MessageLoop* aIOLoop, IPC::Channel* aChannel);
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-
-  mozilla::ipc::IPCResult RecvPreferenceUpdate(const Pref& aPref) override;
-  mozilla::ipc::IPCResult RecvRequestMemoryReport(
-      const uint32_t& generation, const bool& anonymize,
-      const bool& minimizeMemoryUsage, const MaybeFileDesc& DMDFile) override;
-  mozilla::ipc::IPCResult RecvSetOffline(const bool& aOffline) override;
-  mozilla::ipc::IPCResult RecvInitSocketProcessBridgeParent(
-      const ProcessId& aContentProcessId,
-      Endpoint<mozilla::net::PSocketProcessBridgeParent>&& aEndpoint) override;
-  mozilla::ipc::IPCResult RecvInitProfiler(
-      Endpoint<mozilla::PProfilerChild>&& aEndpoint) override;
-
-  void CleanUp();
-  void DestroySocketProcessBridgeParent(ProcessId aId);
-
- private:
-  // Mapping of content process id and the SocketProcessBridgeParent.
-  // This table keeps SocketProcessBridgeParent alive in socket process.
-  nsRefPtrHashtable<nsUint32HashKey, SocketProcessBridgeParent>
-      mSocketProcessBridgeParentMap;
-
-#ifdef MOZ_GECKO_PROFILER
-  RefPtr<ChildProfilerController> mProfilerController;
-#endif
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessChild_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessHost.cpp
+++ /dev/null
@@ -1,345 +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 "SocketProcessHost.h"
-
-#include "nsAppRunner.h"
-#include "nsIObserverService.h"
-#include "SocketProcessParent.h"
-
-#ifdef MOZ_GECKO_PROFILER
-#include "ProfilerParent.h"
-#endif
-
-namespace mozilla {
-namespace net {
-
-#define NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC "ipc:network:set-offline"
-
-class OfflineObserver final : public nsIObserver {
- public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-  explicit OfflineObserver(SocketProcessHost* aProcessHost)
-      : mProcessHost(aProcessHost) {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-    if (obs) {
-      obs->AddObserver(this, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC, false);
-      obs->AddObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID, false);
-    }
-  }
-
-  void Destroy() {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-    if (obs) {
-      obs->RemoveObserver(this, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC);
-    }
-    mProcessHost = nullptr;
-  }
-
- private:
-  // nsIObserver implementation.
-  NS_IMETHOD
-  Observe(nsISupports* aSubject, const char* aTopic,
-          const char16_t* aData) override {
-    if (!mProcessHost) {
-      return NS_OK;
-    }
-
-    if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC)) {
-      NS_ConvertUTF16toUTF8 dataStr(aData);
-      const char* offline = dataStr.get();
-      if (!mProcessHost->IsConnected() ||
-          mProcessHost->GetActor()->SendSetOffline(
-              !strcmp(offline, "true") ? true : false)) {
-        return NS_ERROR_NOT_AVAILABLE;
-      }
-    } else if (!strcmp(aTopic, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID)) {
-      nsCOMPtr<nsIObserverService> obs =
-          mozilla::services::GetObserverService();
-        obs->RemoveObserver(this, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC);
-        obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
-    }
-
-    return NS_OK;
-  }
-  virtual ~OfflineObserver() = default;
-
-  SocketProcessHost* mProcessHost;
-};
-
-NS_IMPL_ISUPPORTS(OfflineObserver, nsIObserver)
-
-SocketProcessHost::SocketProcessHost(Listener* aListener)
-    : GeckoChildProcessHost(GeckoProcessType_Socket),
-      mListener(aListener),
-      mTaskFactory(this),
-      mLaunchPhase(LaunchPhase::Unlaunched),
-      mShutdownRequested(false),
-      mChannelClosed(false) {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_COUNT_CTOR(SocketProcessHost);
-}
-
-SocketProcessHost::~SocketProcessHost() {
-  MOZ_COUNT_DTOR(SocketProcessHost);
-  if (mOfflineObserver) {
-    RefPtr<OfflineObserver> observer = mOfflineObserver;
-    NS_DispatchToMainThread(
-        NS_NewRunnableFunction("SocketProcessHost::DestroyOfflineObserver",
-                               [observer]() { observer->Destroy(); }));
-  }
-}
-
-bool SocketProcessHost::Launch() {
-  MOZ_ASSERT(mLaunchPhase == LaunchPhase::Unlaunched);
-  MOZ_ASSERT(!mSocketProcessParent);
-  MOZ_ASSERT(NS_IsMainThread());
-
-  std::vector<std::string> extraArgs;
-
-  nsAutoCString parentBuildID(mozilla::PlatformBuildID());
-  extraArgs.push_back("-parentBuildID");
-  extraArgs.push_back(parentBuildID.get());
-
-  SharedPreferenceSerializer prefSerializer;
-  if (!prefSerializer.SerializeToSharedMemory()) {
-    return false;
-  }
-
-  // Formats a pointer or pointer-sized-integer as a string suitable for passing
-  // in an arguments list.
-  auto formatPtrArg = [](auto arg) {
-    return nsPrintfCString("%zu", uintptr_t(arg));
-  };
-
-#if defined(XP_WIN)
-  // Record the handle as to-be-shared, and pass it via a command flag. This
-  // works because Windows handles are system-wide.
-  HANDLE prefsHandle = prefSerializer.GetSharedMemoryHandle();
-  AddHandleToShare(prefsHandle);
-  AddHandleToShare(prefSerializer.GetPrefMapHandle().get());
-  extraArgs.push_back("-prefsHandle");
-  extraArgs.push_back(formatPtrArg(prefsHandle).get());
-  extraArgs.push_back("-prefMapHandle");
-  extraArgs.push_back(
-      formatPtrArg(prefSerializer.GetPrefMapHandle().get()).get());
-#else
-  // In contrast, Unix fds are per-process. So remap the fd to a fixed one that
-  // will be used in the child.
-  // XXX: bug 1440207 is about improving how fixed fds are used.
-  //
-  // Note: on Android, AddFdToRemap() sets up the fd to be passed via a Parcel,
-  // and the fixed fd isn't used. However, we still need to mark it for
-  // remapping so it doesn't get closed in the child.
-  AddFdToRemap(prefSerializer.GetSharedMemoryHandle().fd, kPrefsFileDescriptor);
-  AddFdToRemap(prefSerializer.GetPrefMapHandle().get(), kPrefMapFileDescriptor);
-#endif
-
-  // Pass the lengths via command line flags.
-  extraArgs.push_back("-prefsLen");
-  extraArgs.push_back(formatPtrArg(prefSerializer.GetPrefLength()).get());
-  extraArgs.push_back("-prefMapSize");
-  extraArgs.push_back(formatPtrArg(prefSerializer.GetPrefMapSize()).get());
-
-  mLaunchPhase = LaunchPhase::Waiting;
-  if (!GeckoChildProcessHost::LaunchAndWaitForProcessHandle(extraArgs)) {
-    mLaunchPhase = LaunchPhase::Complete;
-    return false;
-  }
-
-  return true;
-}
-
-void SocketProcessHost::OnChannelConnected(int32_t peer_pid) {
-  MOZ_ASSERT(!NS_IsMainThread());
-
-  GeckoChildProcessHost::OnChannelConnected(peer_pid);
-
-  // Post a task to the main thread. Take the lock because mTaskFactory is not
-  // thread-safe.
-  RefPtr<Runnable> runnable;
-  {
-    MonitorAutoLock lock(mMonitor);
-    runnable = mTaskFactory.NewRunnableMethod(
-        &SocketProcessHost::OnChannelConnectedTask);
-  }
-  NS_DispatchToMainThread(runnable);
-}
-
-void SocketProcessHost::OnChannelError() {
-  MOZ_ASSERT(!NS_IsMainThread());
-
-  GeckoChildProcessHost::OnChannelError();
-
-  // Post a task to the main thread. Take the lock because mTaskFactory is not
-  // thread-safe.
-  RefPtr<Runnable> runnable;
-  {
-    MonitorAutoLock lock(mMonitor);
-    runnable =
-        mTaskFactory.NewRunnableMethod(&SocketProcessHost::OnChannelErrorTask);
-  }
-  NS_DispatchToMainThread(runnable);
-}
-
-void SocketProcessHost::OnChannelConnectedTask() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (mLaunchPhase == LaunchPhase::Waiting) {
-    InitAfterConnect(true);
-  }
-}
-
-void SocketProcessHost::OnChannelErrorTask() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (mLaunchPhase == LaunchPhase::Waiting) {
-    InitAfterConnect(false);
-  }
-}
-
-void SocketProcessHost::InitAfterConnect(bool aSucceeded) {
-  MOZ_ASSERT(mLaunchPhase == LaunchPhase::Waiting);
-  MOZ_ASSERT(!mSocketProcessParent);
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mLaunchPhase = LaunchPhase::Complete;
-
-  if (aSucceeded) {
-    mSocketProcessParent = MakeUnique<SocketProcessParent>(this);
-    DebugOnly<bool> rv = mSocketProcessParent->Open(
-        GetChannel(), base::GetProcId(GetChildProcessHandle()));
-    MOZ_ASSERT(rv);
-
-    nsCOMPtr<nsIIOService> ioService(do_GetIOService());
-    MOZ_ASSERT(ioService, "No IO service?");
-    bool offline = false;
-    DebugOnly<nsresult> result = ioService->GetOffline(&offline);
-    MOZ_ASSERT(NS_SUCCEEDED(result), "Failed getting offline?");
-
-#ifdef MOZ_GECKO_PROFILER
-    Unused << GetActor()->SendInitProfiler(
-        ProfilerParent::CreateForProcess(GetActor()->OtherPid()));
-#endif
-
-    Unused << GetActor()->SendSetOffline(offline);
-
-    mOfflineObserver = new OfflineObserver(this);
-  }
-
-  if (mListener) {
-    mListener->OnProcessLaunchComplete(this, aSucceeded);
-  }
-}
-
-void SocketProcessHost::Shutdown() {
-  MOZ_ASSERT(!mShutdownRequested);
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mListener = nullptr;
-  if (mOfflineObserver) {
-    mOfflineObserver->Destroy();
-    mOfflineObserver = nullptr;
-  }
-
-  if (mSocketProcessParent) {
-    // OnChannelClosed uses this to check if the shutdown was expected or
-    // unexpected.
-    mShutdownRequested = true;
-
-    // The channel might already be closed if we got here unexpectedly.
-    if (!mChannelClosed) {
-      mSocketProcessParent->Close();
-    }
-
-    return;
-  }
-
-  DestroyProcess();
-}
-
-void SocketProcessHost::OnChannelClosed() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mChannelClosed = true;
-
-  if (!mShutdownRequested && mListener) {
-    // This is an unclean shutdown. Notify our listener that we're going away.
-    mListener->OnProcessUnexpectedShutdown(this);
-  } else {
-    DestroyProcess();
-  }
-
-  // Release the actor.
-  SocketProcessParent::Destroy(std::move(mSocketProcessParent));
-  MOZ_ASSERT(!mSocketProcessParent);
-}
-
-static void DelayedDeleteSubprocess(GeckoChildProcessHost* aSubprocess) {
-  XRE_GetIOMessageLoop()->PostTask(
-      MakeAndAddRef<DeleteTask<GeckoChildProcessHost>>(aSubprocess));
-}
-
-void SocketProcessHost::DestroyProcess() {
-  {
-    MonitorAutoLock lock(mMonitor);
-    mTaskFactory.RevokeAll();
-  }
-
-  MessageLoop::current()->PostTask(NewRunnableFunction(
-      "DestroySocketProcessRunnable", DelayedDeleteSubprocess, this));
-}
-
-//-----------------------------------------------------------------------------
-// SocketProcessMemoryReporter
-//-----------------------------------------------------------------------------
-
-bool SocketProcessMemoryReporter::IsAlive() const {
-  MOZ_ASSERT(gIOService);
-
-  if (!gIOService->mSocketProcess) {
-    return false;
-  }
-
-  return gIOService->mSocketProcess->IsConnected();
-}
-
-bool SocketProcessMemoryReporter::SendRequestMemoryReport(
-    const uint32_t& aGeneration, const bool& aAnonymize,
-    const bool& aMinimizeMemoryUsage, const dom::MaybeFileDesc& aDMDFile) {
-  MOZ_ASSERT(gIOService);
-
-  if (!gIOService->mSocketProcess) {
-    return false;
-  }
-
-  SocketProcessParent* actor = gIOService->mSocketProcess->GetActor();
-  if (!actor) {
-    return false;
-  }
-
-  return actor->SendRequestMemoryReport(aGeneration, aAnonymize,
-                                        aMinimizeMemoryUsage, aDMDFile);
-}
-
-int32_t SocketProcessMemoryReporter::Pid() const {
-  MOZ_ASSERT(gIOService);
-
-  if (!gIOService->mSocketProcess) {
-    return 0;
-  }
-
-  if (SocketProcessParent* actor = gIOService->mSocketProcess->GetActor()) {
-    return (int32_t)actor->OtherPid();
-  }
-  return 0;
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessHost.h
+++ /dev/null
@@ -1,131 +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_net_SocketProcessHost_h
-#define mozilla_net_SocketProcessHost_h
-
-#include "mozilla/UniquePtr.h"
-#include "mozilla/ipc/GeckoChildProcessHost.h"
-#include "mozilla/MemoryReportingProcess.h"
-#include "mozilla/ipc/TaskFactory.h"
-
-namespace mozilla {
-namespace net {
-
-class OfflineObserver;
-class SocketProcessParent;
-
-// SocketProcessHost is the "parent process" container for a subprocess handle
-// and IPC connection. It owns the parent process IPDL actor, which in this
-// case, is a SocketProcessParent.
-// SocketProcessHost is allocated and managed by nsIOService in parent process.
-class SocketProcessHost final : public mozilla::ipc::GeckoChildProcessHost {
-  friend class SocketProcessParent;
-
- public:
-  class Listener {
-   public:
-    NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Listener)
-
-    // Called when the process of launching the process is complete.
-    virtual void OnProcessLaunchComplete(SocketProcessHost* aHost,
-                                         bool aSucceeded) = 0;
-
-    // Called when the channel is closed but Shutdown() is not invoked.
-    virtual void OnProcessUnexpectedShutdown(SocketProcessHost* aHost) = 0;
-
-   protected:
-    virtual ~Listener() = default;
-  };
-
- public:
-  explicit SocketProcessHost(Listener* listener);
-  ~SocketProcessHost();
-
-  // Launch the socket process asynchronously.
-  // The OnProcessLaunchComplete listener callback will be invoked
-  // either when a connection has been established, or if a connection
-  // could not be established due to an asynchronous error.
-  bool Launch();
-
-  // Inform the socket process that it should clean up its resources and shut
-  // down. This initiates an asynchronous shutdown sequence. After this method
-  // returns, it is safe for the caller to forget its pointer to the
-  // SocketProcessHost.
-  void Shutdown();
-
-  // Return the actor for the top-level actor of the process. Return null if
-  // the process is not connected.
-  SocketProcessParent* GetActor() const {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    return mSocketProcessParent.get();
-  }
-
-  bool IsConnected() const {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    return !!mSocketProcessParent;
-  }
-
-  // Called on the IO thread.
-  void OnChannelConnected(int32_t peer_pid) override;
-  void OnChannelError() override;
-
- private:
-  // Called on the main thread.
-  void OnChannelConnectedTask();
-  void OnChannelErrorTask();
-
-  // Called on the main thread after a connection has been established.
-  void InitAfterConnect(bool aSucceeded);
-
-  // Called on the main thread when the mSocketParent actor is shutting down.
-  void OnChannelClosed();
-
-  void DestroyProcess();
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(SocketProcessHost);
-
-  RefPtr<Listener> mListener;
-  mozilla::ipc::TaskFactory<SocketProcessHost> mTaskFactory;
-
-  enum class LaunchPhase { Unlaunched, Waiting, Complete };
-  LaunchPhase mLaunchPhase;
-
-  UniquePtr<SocketProcessParent> mSocketProcessParent;
-  // mShutdownRequested is set to true only when Shutdown() is called.
-  // If mShutdownRequested is false and the IPC channel is closed,
-  // OnProcessUnexpectedShutdown will be invoked.
-  bool mShutdownRequested;
-  bool mChannelClosed;
-
-  RefPtr<OfflineObserver> mOfflineObserver;
-};
-
-class SocketProcessMemoryReporter : public MemoryReportingProcess {
- public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SocketProcessMemoryReporter, override)
-
-  SocketProcessMemoryReporter() = default;
-
-  bool IsAlive() const override;
-
-  bool SendRequestMemoryReport(const uint32_t& aGeneration,
-                               const bool& aAnonymize,
-                               const bool& aMinimizeMemoryUsage,
-                               const dom::MaybeFileDesc& aDMDFile) override;
-
-  int32_t Pid() const override;
-
- protected:
-  virtual ~SocketProcessMemoryReporter() = default;
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessHost_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessImpl.cpp
+++ /dev/null
@@ -1,96 +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 "SocketProcessImpl.h"
-
-#include "base/command_line.h"
-#include "base/shared_memory.h"
-#include "base/string_util.h"
-#include "mozilla/ipc/IOThreadChild.h"
-#include "mozilla/BackgroundHangMonitor.h"
-#include "mozilla/Preferences.h"
-
-using mozilla::ipc::IOThreadChild;
-
-namespace mozilla {
-namespace net {
-
-LazyLogModule gSocketProcessLog("socketprocess");
-
-SocketProcessImpl::SocketProcessImpl(ProcessId aParentPid)
-    : ProcessChild(aParentPid) {}
-
-SocketProcessImpl::~SocketProcessImpl() {}
-
-bool SocketProcessImpl::Init(int aArgc, char* aArgv[]) {
-#ifdef OS_POSIX
-  if (PR_GetEnv("MOZ_DEBUG_SOCKET_PROCESS")) {
-    printf_stderr("\n\nSOCKETPROCESSnSOCKETPROCESS\n  debug me @ %d\n\n",
-                  base::GetCurrentProcId());
-    sleep(30);
-  }
-#endif
-  char* parentBuildID = nullptr;
-  char* prefsHandle = nullptr;
-  char* prefMapHandle = nullptr;
-  char* prefsLen = nullptr;
-  char* prefMapSize = nullptr;
-
-  for (int i = 1; i < aArgc; i++) {
-    if (!aArgv[i]) {
-      continue;
-    }
-
-    if (strcmp(aArgv[i], "-parentBuildID") == 0) {
-      if (++i == aArgc) {
-        return false;
-      }
-
-      parentBuildID = aArgv[i];
-
-#ifdef XP_WIN
-    } else if (strcmp(aArgv[i], "-prefsHandle") == 0) {
-      if (++i == aArgc) {
-        return false;
-      }
-      prefsHandle = aArgv[i];
-    } else if (strcmp(aArgv[i], "-prefMapHandle") == 0) {
-      if (++i == aArgc) {
-        return false;
-      }
-      prefMapHandle = aArgv[i];
-#endif
-    } else if (strcmp(aArgv[i], "-prefsLen") == 0) {
-      if (++i == aArgc) {
-        return false;
-      }
-      prefsLen = aArgv[i];
-    } else if (strcmp(aArgv[i], "-prefMapSize") == 0) {
-      if (++i == aArgc) {
-        return false;
-      }
-      prefMapSize = aArgv[i];
-    }
-  }
-
-  SharedPreferenceDeserializer deserializer;
-  if (!deserializer.DeserializeFromSharedMemory(prefsHandle, prefMapHandle,
-                                                prefsLen, prefMapSize)) {
-    return false;
-  }
-
-  if (NS_FAILED(NS_InitXPCOM2(nullptr, nullptr, nullptr))) {
-    return false;
-  }
-
-  return mSocketProcessChild.Init(ParentPid(), parentBuildID,
-                                  IOThreadChild::message_loop(),
-                                  IOThreadChild::channel());
-}
-
-void SocketProcessImpl::CleanUp() { mSocketProcessChild.CleanUp(); }
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessImpl.h
+++ /dev/null
@@ -1,36 +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_net_SocketProcessImpl_h
-#define mozilla_net_SocketProcessImpl_h
-
-#include "mozilla/ipc/ProcessChild.h"
-#include "SocketProcessChild.h"
-
-namespace mozilla {
-namespace net {
-
-// This class owns the subprocess instance of socket child process.
-// It is instantiated as a singleton in XRE_InitChildProcess.
-class SocketProcessImpl final : public mozilla::ipc::ProcessChild {
- protected:
-  typedef mozilla::ipc::ProcessChild ProcessChild;
-
- public:
-  explicit SocketProcessImpl(ProcessId aParentPid);
-  ~SocketProcessImpl();
-
-  bool Init(int aArgc, char* aArgv[]) override;
-  void CleanUp() override;
-
- private:
-  SocketProcessChild mSocketProcessChild;
-  DISALLOW_COPY_AND_ASSIGN(SocketProcessImpl);
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessImpl_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessLogging.h
+++ /dev/null
@@ -1,20 +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_SocketProcessLogging_h
-#define mozilla_SocketProcessLogging_h
-
-#include "mozilla/Logging.h"
-
-namespace mozilla {
-namespace net {
-extern LazyLogModule gSocketProcessLog;
-}
-}  // namespace mozilla
-
-#define LOG(msg) MOZ_LOG(gSocketProcessLog, mozilla::LogLevel::Debug, msg)
-#define LOG_ENABLED() MOZ_LOG_TEST(gSocketProcessLog, mozilla::LogLevel::Debug)
-
-#endif  // mozilla_SocketProcessLogging_h
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessParent.cpp
+++ /dev/null
@@ -1,149 +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 "SocketProcessParent.h"
-
-#include "SocketProcessHost.h"
-#include "mozilla/ipc/CrashReporterHost.h"
-#include "mozilla/Telemetry.h"
-#include "mozilla/TelemetryIPC.h"
-
-namespace mozilla {
-namespace net {
-
-static SocketProcessParent* sSocketProcessParent;
-
-SocketProcessParent::SocketProcessParent(SocketProcessHost* aHost)
-    : mHost(aHost) {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mHost);
-
-  MOZ_COUNT_CTOR(SocketProcessParent);
-  sSocketProcessParent = this;
-}
-
-SocketProcessParent::~SocketProcessParent() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  MOZ_COUNT_DTOR(SocketProcessParent);
-  sSocketProcessParent = nullptr;
-}
-
-/* static */ SocketProcessParent* SocketProcessParent::GetSingleton() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  return sSocketProcessParent;
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvInitCrashReporter(
-    Shmem&& aShmem, const NativeThreadId& aThreadId) {
-  mCrashReporter = MakeUnique<CrashReporterHost>(GeckoProcessType_Content,
-                                                 aShmem, aThreadId);
-
-  return IPC_OK();
-}
-
-void SocketProcessParent::ActorDestroy(ActorDestroyReason aWhy) {
-  if (aWhy == AbnormalShutdown) {
-    if (mCrashReporter) {
-      mCrashReporter->GenerateCrashReport(OtherPid());
-      mCrashReporter = nullptr;
-    }
-  }
-
-  if (mHost) {
-    mHost->OnChannelClosed();
-  }
-}
-
-bool SocketProcessParent::SendRequestMemoryReport(
-    const uint32_t& aGeneration, const bool& aAnonymize,
-    const bool& aMinimizeMemoryUsage, const MaybeFileDesc& aDMDFile) {
-  mMemoryReportRequest = MakeUnique<dom::MemoryReportRequestHost>(aGeneration);
-  Unused << PSocketProcessParent::SendRequestMemoryReport(
-      aGeneration, aAnonymize, aMinimizeMemoryUsage, aDMDFile);
-  return true;
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvAddMemoryReport(
-    const MemoryReport& aReport) {
-  if (mMemoryReportRequest) {
-    mMemoryReportRequest->RecvReport(aReport);
-  }
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvFinishMemoryReport(
-    const uint32_t& aGeneration) {
-  if (mMemoryReportRequest) {
-    mMemoryReportRequest->Finish(aGeneration);
-    mMemoryReportRequest = nullptr;
-  }
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvAccumulateChildHistograms(
-    InfallibleTArray<HistogramAccumulation>&& aAccumulations) {
-  TelemetryIPC::AccumulateChildHistograms(Telemetry::ProcessID::Socket,
-                                          aAccumulations);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvAccumulateChildKeyedHistograms(
-    InfallibleTArray<KeyedHistogramAccumulation>&& aAccumulations) {
-  TelemetryIPC::AccumulateChildKeyedHistograms(Telemetry::ProcessID::Socket,
-                                               aAccumulations);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvUpdateChildScalars(
-    InfallibleTArray<ScalarAction>&& aScalarActions) {
-  TelemetryIPC::UpdateChildScalars(Telemetry::ProcessID::Socket,
-                                   aScalarActions);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvUpdateChildKeyedScalars(
-    InfallibleTArray<KeyedScalarAction>&& aScalarActions) {
-  TelemetryIPC::UpdateChildKeyedScalars(Telemetry::ProcessID::Socket,
-                                        aScalarActions);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvRecordChildEvents(
-    nsTArray<mozilla::Telemetry::ChildEventData>&& aEvents) {
-  TelemetryIPC::RecordChildEvents(Telemetry::ProcessID::Socket, aEvents);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult SocketProcessParent::RecvRecordDiscardedData(
-    const mozilla::Telemetry::DiscardedData& aDiscardedData) {
-  TelemetryIPC::RecordDiscardedData(Telemetry::ProcessID::Socket,
-                                    aDiscardedData);
-  return IPC_OK();
-}
-
-// To ensure that IPDL is finished before SocketParent gets deleted.
-class DeferredDeleteSocketProcessParent : public Runnable {
- public:
-  explicit DeferredDeleteSocketProcessParent(
-      UniquePtr<SocketProcessParent>&& aParent)
-      : Runnable("net::DeferredDeleteSocketProcessParent"),
-        mParent(std::move(aParent)) {}
-
-  NS_IMETHODIMP Run() override { return NS_OK; }
-
- private:
-  UniquePtr<SocketProcessParent> mParent;
-};
-
-/* static */ void SocketProcessParent::Destroy(
-    UniquePtr<SocketProcessParent>&& aParent) {
-  NS_DispatchToMainThread(
-      new DeferredDeleteSocketProcessParent(std::move(aParent)));
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/SocketProcessParent.h
+++ /dev/null
@@ -1,74 +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_net_SocketProcessParent_h
-#define mozilla_net_SocketProcessParent_h
-
-#include "mozilla/UniquePtr.h"
-#include "mozilla/net/PSocketProcessParent.h"
-
-namespace mozilla {
-
-namespace dom {
-class MemoryReport;
-class MemoryReportRequestHost;
-}  // namespace dom
-
-namespace ipc {
-class CrashReporterHost;
-}  // namespace ipc
-
-namespace net {
-
-class SocketProcessHost;
-
-// IPC actor of socket process in parent process. This is allocated and managed
-// by SocketProcessHost.
-class SocketProcessParent final : public PSocketProcessParent {
- public:
-  friend class SocketProcessHost;
-
-  explicit SocketProcessParent(SocketProcessHost* aHost);
-  ~SocketProcessParent();
-
-  static SocketProcessParent* GetSingleton();
-
-  mozilla::ipc::IPCResult RecvInitCrashReporter(
-      Shmem&& aShmem, const NativeThreadId& aThreadId) override;
-  mozilla::ipc::IPCResult RecvAddMemoryReport(
-      const MemoryReport& aReport) override;
-  mozilla::ipc::IPCResult RecvFinishMemoryReport(
-      const uint32_t& aGeneration) override;
-  mozilla::ipc::IPCResult RecvAccumulateChildHistograms(
-      InfallibleTArray<HistogramAccumulation>&& aAccumulations) override;
-  mozilla::ipc::IPCResult RecvAccumulateChildKeyedHistograms(
-      InfallibleTArray<KeyedHistogramAccumulation>&& aAccumulations) override;
-  mozilla::ipc::IPCResult RecvUpdateChildScalars(
-      InfallibleTArray<ScalarAction>&& aScalarActions) override;
-  mozilla::ipc::IPCResult RecvUpdateChildKeyedScalars(
-      InfallibleTArray<KeyedScalarAction>&& aScalarActions) override;
-  mozilla::ipc::IPCResult RecvRecordChildEvents(
-      nsTArray<ChildEventData>&& events) override;
-  mozilla::ipc::IPCResult RecvRecordDiscardedData(
-      const DiscardedData& aDiscardedData) override;
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-  bool SendRequestMemoryReport(const uint32_t& aGeneration,
-                               const bool& aAnonymize,
-                               const bool& aMinimizeMemoryUsage,
-                               const MaybeFileDesc& aDMDFile);
-
- private:
-  SocketProcessHost* mHost;
-  UniquePtr<ipc::CrashReporterHost> mCrashReporter;
-  UniquePtr<dom::MemoryReportRequestHost> mMemoryReportRequest;
-
-  static void Destroy(UniquePtr<SocketProcessParent>&& aParent);
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_SocketProcessParent_h
--- a/netwerk/ipc/moz.build
+++ b/netwerk/ipc/moz.build
@@ -6,47 +6,33 @@
 
 EXPORTS.mozilla.net += [
     'ChannelEventQueue.h',
     'NeckoChild.h',
     'NeckoCommon.h',
     'NeckoMessageUtils.h',
     'NeckoParent.h',
     'NeckoTargetHolder.h',
-    'SocketProcessBridgeChild.h',
-    'SocketProcessBridgeParent.h',
-    'SocketProcessChild.h',
-    'SocketProcessHost.h',
-    'SocketProcessImpl.h',
-    'SocketProcessParent.h',
 ]
 
 UNIFIED_SOURCES += [
     'ChannelEventQueue.cpp',
     'NeckoChild.cpp',
     'NeckoCommon.cpp',
     'NeckoParent.cpp',
     'NeckoTargetHolder.cpp',
-    'SocketProcessBridgeChild.cpp',
-    'SocketProcessBridgeParent.cpp',
-    'SocketProcessChild.cpp',
-    'SocketProcessHost.cpp',
-    'SocketProcessImpl.cpp',
-    'SocketProcessParent.cpp',
 ]
 
 IPDL_SOURCES = [
     'NeckoChannelParams.ipdlh',
     'PChannelDiverter.ipdl',
     'PDataChannel.ipdl',
     'PFileChannel.ipdl',
     'PNecko.ipdl',
     'PSimpleChannel.ipdl',
-    'PSocketProcess.ipdl',
-    'PSocketProcessBridge.ipdl'
 ]
 
 # needed so --disable-webrtc builds work (yes, a bit messy)
 if not CONFIG['MOZ_WEBRTC']:
   IPDL_SOURCES += [
       '../../media/mtransport/ipc/PStunAddrsRequest.ipdl',
       '../../media/mtransport/ipc/PWebrtcProxyChannel.ipdl',
   ]
@@ -60,13 +46,12 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/caps',
     '/dom/base',
     '/modules/libjar',
     '/netwerk/base',
     '/netwerk/protocol/http',
-    '/xpcom/threads'
 ]
 
 # Add libFuzzer configuration directives
 include('/tools/fuzzing/libfuzzer-config.mozbuild')
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -1112,20 +1112,16 @@ uint32_t nsHttpHandler::MaxSocketCount()
 }
 
 void nsHttpHandler::PrefsChanged(const char *pref) {
   nsresult rv = NS_OK;
   int32_t val;
 
   LOG(("nsHttpHandler::PrefsChanged [pref=%s]\n", pref));
 
-  if (pref) {
-    gIOService->NotifySocketProcessPrefsChanged(pref);
-  }
-
 #define PREF_CHANGED(p) ((pref == nullptr) || !PL_strcmp(pref, p))
 #define MULTI_PREF_CHANGED(p) \
   ((pref == nullptr) || !PL_strncmp(pref, p, sizeof(p) - 1))
 
   // If a security pref changed, lets clear our connection pool reuse
   if (MULTI_PREF_CHANGED(SECURITY_PREFIX)) {
     LOG(("nsHttpHandler::PrefsChanged Security Pref Changed %s\n", pref));
     if (mConnMgr) {
--- a/toolkit/components/crashes/CrashManager.jsm
+++ b/toolkit/components/crashes/CrashManager.jsm
@@ -175,19 +175,16 @@ this.CrashManager.prototype = Object.fre
   PROCESS_TYPE_GMPLUGIN: "gmplugin",
 
   // A crash in the GPU process.
   PROCESS_TYPE_GPU: "gpu",
 
   // A crash in the RDD process.
   PROCESS_TYPE_RDD: "rdd",
 
-  // A crash in the socket process.
-  PROCESS_TYPE_SOCKET: "socket",
-
   // A real crash.
   CRASH_TYPE_CRASH: "crash",
 
   // A hang.
   CRASH_TYPE_HANG: "hang",
 
   // Submission result values.
   SUBMISSION_RESULT_OK: "ok",
@@ -462,18 +459,17 @@ this.CrashManager.prototype = Object.fre
       if (deferred) {
         this._crashPromises.delete(id);
         deferred.resolve();
       }
 
       // Send a telemetry ping for each non-main process crash
       if (processType === this.PROCESS_TYPE_CONTENT ||
           processType === this.PROCESS_TYPE_GPU ||
-          processType === this.PROCESS_TYPE_RDD ||
-          processType === this.PROCESS_TYPE_SOCKET) {
+          processType === this.PROCESS_TYPE_RDD) {
         this._sendCrashPing(id, processType, date, metadata);
       }
     })();
 
     return promise;
   },
 
   /**
--- a/toolkit/components/crashes/CrashService.js
+++ b/toolkit/components/crashes/CrashService.js
@@ -177,19 +177,16 @@ CrashService.prototype = Object.freeze({
       processType = Services.crashmanager.PROCESS_TYPE_GMPLUGIN;
       break;
     case Ci.nsICrashService.PROCESS_TYPE_GPU:
       processType = Services.crashmanager.PROCESS_TYPE_GPU;
       break;
     case Ci.nsICrashService.PROCESS_TYPE_RDD:
       processType = Services.crashmanager.PROCESS_TYPE_RDD;
       break;
-    case Ci.nsICrashService.PROCESS_TYPE_SOCKET:
-      processType = Services.crashmanager.PROCESS_TYPE_SOCKET;
-      break;
     case Ci.nsICrashService.PROCESS_TYPE_IPDLUNITTEST:
       // We'll never send crash reports for this type of process.
       return;
     default:
       throw new Error("Unrecognized PROCESS_TYPE: " + processType);
     }
 
     let allThreads = false;
--- a/toolkit/components/crashes/nsICrashService.idl
+++ b/toolkit/components/crashes/nsICrashService.idl
@@ -24,14 +24,13 @@ interface nsICrashService : nsISupports
   const long PROCESS_TYPE_MAIN = 0;
   const long PROCESS_TYPE_PLUGIN = 1;
   const long PROCESS_TYPE_CONTENT = 2;
   const long PROCESS_TYPE_IPDLUNITTEST = 3;
   const long PROCESS_TYPE_GMPLUGIN = 4;
   const long PROCESS_TYPE_GPU = 5;
   const long PROCESS_TYPE_VR = 6;
   const long PROCESS_TYPE_RDD = 7;
-  const long PROCESS_TYPE_SOCKET = 8;
   // New process types should be added at the end of the above list.
 
   const long CRASH_TYPE_CRASH = 0;
   const long CRASH_TYPE_HANG = 1;
 };
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
+++ b/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
@@ -391,26 +391,24 @@ add_task(async function test_addCrash() 
   await m.addCrash(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_HANG,
                    "plugin-hang", DUMMY_DATE);
   await m.addCrash(m.PROCESS_TYPE_GMPLUGIN, m.CRASH_TYPE_CRASH,
                    "gmplugin-crash", DUMMY_DATE);
   await m.addCrash(m.PROCESS_TYPE_GPU, m.CRASH_TYPE_CRASH,
                    "gpu-crash", DUMMY_DATE);
   await m.addCrash(m.PROCESS_TYPE_RDD, m.CRASH_TYPE_CRASH,
                    "rdd-crash", DUMMY_DATE);
-  await m.addCrash(m.PROCESS_TYPE_SOCKET, m.CRASH_TYPE_CRASH,
-                   "socket-crash", DUMMY_DATE);
 
   await m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
                    "changing-item", DUMMY_DATE);
   await m.addCrash(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG,
                    "changing-item", DUMMY_DATE_2);
 
   crashes = await m.getCrashes();
-  Assert.equal(crashes.length, 11);
+  Assert.equal(crashes.length, 10);
 
   let map = new Map(crashes.map(crash => [crash.id, crash]));
 
   let crash = map.get("main-crash");
   Assert.ok(!!crash);
   Assert.equal(crash.crashDate, DUMMY_DATE);
   Assert.equal(crash.type, m.PROCESS_TYPE_MAIN + "-" + m.CRASH_TYPE_CRASH);
   Assert.ok(crash.isOfType(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH));
@@ -458,36 +456,29 @@ add_task(async function test_addCrash() 
   Assert.ok(crash.isOfType(m.PROCESS_TYPE_GPU, m.CRASH_TYPE_CRASH));
 
   crash = map.get("rdd-crash");
   Assert.ok(!!crash);
   Assert.equal(crash.crashDate, DUMMY_DATE);
   Assert.equal(crash.type, m.PROCESS_TYPE_RDD + "-" + m.CRASH_TYPE_CRASH);
   Assert.ok(crash.isOfType(m.PROCESS_TYPE_RDD, m.CRASH_TYPE_CRASH));
 
-  crash = map.get("socket-crash");
-  Assert.ok(!!crash);
-  Assert.equal(crash.crashDate, DUMMY_DATE);
-  Assert.equal(crash.type, m.PROCESS_TYPE_SOCKET + "-" + m.CRASH_TYPE_CRASH);
-  Assert.ok(crash.isOfType(m.PROCESS_TYPE_SOCKET, m.CRASH_TYPE_CRASH));
-
   crash = map.get("changing-item");
   Assert.ok(!!crash);
   Assert.equal(crash.crashDate, DUMMY_DATE_2);
   Assert.equal(crash.type, m.PROCESS_TYPE_CONTENT + "-" + m.CRASH_TYPE_HANG);
   Assert.ok(crash.isOfType(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG));
 });
 
 add_task(async function test_child_process_crash_ping() {
   let m = await getManager();
   const EXPECTED_PROCESSES = [
     m.PROCESS_TYPE_CONTENT,
     m.PROCESS_TYPE_GPU,
     m.PROCESS_TYPE_RDD,
-    m.PROCESS_TYPE_SOCKET,
   ];
 
   const UNEXPECTED_PROCESSES = [
     m.PROCESS_TYPE_PLUGIN,
     m.PROCESS_TYPE_GMPLUGIN,
     null,
     12, // non-string process type
   ];
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
+++ b/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
@@ -18,17 +18,16 @@ DUMMY_DATE_2.setMilliseconds(0);
 
 const {
   PROCESS_TYPE_MAIN,
   PROCESS_TYPE_CONTENT,
   PROCESS_TYPE_PLUGIN,
   PROCESS_TYPE_GMPLUGIN,
   PROCESS_TYPE_GPU,
   PROCESS_TYPE_RDD,
-  PROCESS_TYPE_SOCKET,
   CRASH_TYPE_CRASH,
   CRASH_TYPE_HANG,
   SUBMISSION_RESULT_OK,
   SUBMISSION_RESULT_FAILED,
 } = CrashManager.prototype;
 
 var STORE_DIR_COUNT = 0;
 
@@ -377,69 +376,41 @@ add_task(async function test_add_rdd_cra
     s.addCrash(PROCESS_TYPE_RDD, CRASH_TYPE_CRASH, "id1", new Date())
   );
   Assert.equal(s.crashesCount, 2);
 
   let crashes = s.getCrashesOfType(PROCESS_TYPE_RDD, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 2);
 });
 
-add_task(async function test_add_socket_crash() {
-  let s = await getStore();
-
-  Assert.ok(
-    s.addCrash(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH, "id1", new Date())
-  );
-  Assert.equal(s.crashesCount, 1);
-
-  let c = s.crashes[0];
-  Assert.ok(c.crashDate);
-  Assert.equal(c.type, PROCESS_TYPE_SOCKET + "-" + CRASH_TYPE_CRASH);
-  Assert.ok(c.isOfType(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH));
-
-  Assert.ok(
-    s.addCrash(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH, "id2", new Date())
-  );
-  Assert.equal(s.crashesCount, 2);
-
-  Assert.ok(
-    s.addCrash(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH, "id1", new Date())
-  );
-  Assert.equal(s.crashesCount, 2);
-
-  let crashes = s.getCrashesOfType(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH);
-  Assert.equal(crashes.length, 2);
-});
-
 add_task(async function test_add_mixed_types() {
   let s = await getStore();
 
   Assert.ok(
     s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mcrash", new Date()) &&
     s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mhang", new Date()) &&
     s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "ccrash", new Date()) &&
     s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "chang", new Date()) &&
     s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pcrash", new Date()) &&
     s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "phang", new Date()) &&
     s.addCrash(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH, "gmpcrash", new Date()) &&
     s.addCrash(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH, "gpucrash", new Date()) &&
-    s.addCrash(PROCESS_TYPE_RDD, CRASH_TYPE_CRASH, "rddcrash", new Date()) &&
-    s.addCrash(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH, "socketcrash", new Date())
+    s.addCrash(PROCESS_TYPE_RDD, CRASH_TYPE_CRASH, "rddcrash", new Date())
   );
 
-  Assert.equal(s.crashesCount, 10);
+  Assert.equal(s.crashesCount, 9);
 
   await s.save();
 
   s._data.crashes.clear();
   Assert.equal(s.crashesCount, 0);
 
   await s.load();
 
-  Assert.equal(s.crashesCount, 10);
+  Assert.equal(s.crashesCount, 9);
 
   let crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG);
@@ -449,18 +420,16 @@ add_task(async function test_add_mixed_t
   crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 1);
   crashes = s.getCrashesOfType(PROCESS_TYPE_RDD, CRASH_TYPE_CRASH);
   Assert.equal(crashes.length, 1);
-  crashes = s.getCrashesOfType(PROCESS_TYPE_SOCKET, CRASH_TYPE_CRASH);
-  Assert.equal(crashes.length, 1);
 });
 
 // Crashes added beyond the high water mark behave properly.
 add_task(async function test_high_water() {
   let s = await getStore();
 
   let d1 = new Date(2014, 0, 1, 0, 0, 0);
   let d2 = new Date(2014, 0, 2, 0, 0, 0);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -11624,19 +11624,17 @@
       "content-hang",
       "plugin-crash",
       "plugin-hang",
       "gmplugin-crash",
       "gmplugin-hang",
       "gpu-crash",
       "gpu-hang",
       "rdd-crash",
-      "rdd-hang",
-      "socket-crash",
-      "socket-hang"
+      "rdd-hang"
     ],
     "releaseChannelCollection": "opt-out",
     "description": "An attempt to submit a crash. Keyed on the CrashManager Crash.type."
   },
   "PROCESS_CRASH_SUBMIT_SUCCESS": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "never",
     "kind": "boolean",
--- a/toolkit/components/telemetry/Processes.yaml
+++ b/toolkit/components/telemetry/Processes.yaml
@@ -19,11 +19,8 @@ extension:
 gpu:
   gecko_enum: GeckoProcessType_GPU
   description: This is the compositor or GPU process.
 dynamic:
   gecko_enum: GeckoProcessType_Default
   description: >
     This is not a real process, it is used to logically group add-on probes.
     It contains data of any probes registered at runtime by add-ons.
-socket:
-  gecko_enum: GeckoProcessType_Socket
-  description: This is the process that handles networking requests.
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -2516,27 +2516,16 @@ telemetry.test:
     description: A testing uint scalar; not meant to be touched.
     expires: never
     kind: uint
     notification_emails:
       - telemetry-client-dev@mozilla.com
     record_in_processes:
       - 'content'
 
-  socket_only_uint:
-    bug_numbers:
-      - 1486033
-    description: A testing uint scalar; not meant to be touched.
-    expires: never
-    kind: uint
-    notification_emails:
-      - telemetry-client-dev@mozilla.com
-    record_in_processes:
-      - 'socket'
-
   all_processes_uint:
     bug_numbers:
       - 1278556
     description: A testing uint scalar; not meant to be touched.
     expires: never
     kind: uint
     notification_emails:
       - telemetry-client-dev@mozilla.com
--- a/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
+++ b/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
@@ -14,17 +14,16 @@ import sys
 # This is a list of flags that determine which process a measurement is allowed
 # to record from.
 KNOWN_PROCESS_FLAGS = {
     'all': 'All',
     'all_children': 'AllChildren',
     'main': 'Main',
     'content': 'Content',
     'gpu': 'Gpu',
-    'socket': 'Socket',
     # Historical Values
     'all_childs': 'AllChildren',  # Supporting files from before bug 1363725
 }
 
 SUPPORTED_PRODUCTS = {
     'firefox': 'Firefox',
     'fennec': 'Fennec',
     'geckoview': 'Geckoview',
--- a/toolkit/components/telemetry/core/Telemetry.cpp
+++ b/toolkit/components/telemetry/core/Telemetry.cpp
@@ -1157,18 +1157,17 @@ TelemetryImpl::GetIsOfficialTelemetry(bo
 }
 
 already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
   MOZ_ASSERT(
       sTelemetry == nullptr,
       "CreateTelemetryInstance may only be called once, via GetService()");
 
   bool useTelemetry = false;
-  if ((XRE_IsParentProcess() || XRE_IsContentProcess() || XRE_IsGPUProcess() ||
-       XRE_IsSocketProcess()) &&
+  if ((XRE_IsParentProcess() || XRE_IsContentProcess() || XRE_IsGPUProcess()) &&
       // Telemetry is never accumulated when recording or replaying, both
       // because the resulting measurements might be biased and because
       // measurements might occur at non-deterministic points in execution
       // (e.g. garbage collections).
       !recordreplay::IsRecordingOrReplaying()) {
     useTelemetry = true;
   }
 
--- a/toolkit/components/telemetry/core/TelemetryCommon.h
+++ b/toolkit/components/telemetry/core/TelemetryCommon.h
@@ -15,23 +15,22 @@
 #include "nsXULAppAPI.h"
 
 namespace mozilla {
 namespace Telemetry {
 namespace Common {
 
 typedef nsTHashtable<nsCStringHashKey> StringHashSet;
 
-enum class RecordedProcessType : uint16_t {
+enum class RecordedProcessType : uint8_t {
   Main = (1 << GeckoProcessType_Default),  // Also known as "parent process"
   Content = (1 << GeckoProcessType_Content),
   Gpu = (1 << GeckoProcessType_GPU),
-  Socket = (1 << GeckoProcessType_Socket),
-  AllChildren = 0xFFFF - 1,  // All the child processes (i.e. content, gpu, ...)
-  All = 0xFFFF               // All the processes
+  AllChildren = 0xFF - 1,  // All the child processes (i.e. content, gpu, ...)
+  All = 0xFF               // All the processes
 };
 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(RecordedProcessType);
 
 enum class SupportedProduct : uint8_t {
   Firefox = (1 << 0),
   Fennec = (1 << 1),
   Geckoview = (1 << 2),
   All = 0xFF  // All the products
--- a/toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
+++ b/toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
@@ -6,17 +6,16 @@
 
 #include "TelemetryIPCAccumulator.h"
 
 #include "core/TelemetryHistogram.h"
 #include "core/TelemetryScalar.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/gfx/GPUParent.h"
 #include "mozilla/gfx/GPUProcessManager.h"
-#include "mozilla/net/SocketProcessChild.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/SystemGroup.h"
 #include "mozilla/Unused.h"
 #include "nsComponentManagerUtils.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
 
@@ -323,19 +322,16 @@ void TelemetryIPCAccumulator::IPCTimerFi
   // Send accumulated data to the correct parent process.
   switch (XRE_GetProcessType()) {
     case GeckoProcessType_Content:
       SendAccumulatedData(mozilla::dom::ContentChild::GetSingleton());
       break;
     case GeckoProcessType_GPU:
       SendAccumulatedData(mozilla::gfx::GPUParent::GetSingleton());
       break;
-    case GeckoProcessType_Socket:
-      SendAccumulatedData(mozilla::net::SocketProcessChild::GetSingleton());
-      break;
     default:
       MOZ_ASSERT_UNREACHABLE("Unsupported process type");
       break;
   }
 
   gIPCTimerArmed = false;
 }
 
--- a/toolkit/components/telemetry/pings/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/pings/TelemetrySession.jsm
@@ -918,29 +918,22 @@ var Impl = {
       scalars: protect(() => this.getScalars(isSubsession, clearSubsession), {}),
       keyedScalars: protect(() => this.getScalars(isSubsession, clearSubsession, true), {}),
     };
 
     let measurementsContainGPU = Object
       .keys(measurements)
       .some(key => "gpu" in measurements[key]);
 
-    let measurementsContainSocket = Object
-      .keys(measurements)
-      .some(key => "socket" in measurements[key]);
-
     payloadObj.processes = {};
     let processTypes = ["parent", "content", "extension", "dynamic"];
     // Only include the GPU process if we've accumulated data for it.
     if (measurementsContainGPU) {
       processTypes.push("gpu");
     }
-    if (measurementsContainSocket) {
-      processTypes.push("socket");
-    }
 
     // Collect per-process measurements.
     for (const processType of processTypes) {
       let processPayload = {};
 
       for (const key in measurements) {
         let payloadLoc = processPayload;
         // Parent histograms are added to the top-level payload object instead of the process payload.
--- a/toolkit/components/telemetry/tests/python/test_histogramtools_strict.py
+++ b/toolkit/components/telemetry/tests/python/test_histogramtools_strict.py
@@ -16,17 +16,17 @@ sys.path.append(path.join(TELEMETRY_ROOT
 from mozparsers.shared_telemetry_utils import ParserError
 from mozparsers import parse_histograms
 
 
 class TestParser(unittest.TestCase):
     def test_valid_histogram(self):
         SAMPLE_HISTOGRAM = {
             "TEST_VALID_HISTOGRAM": {
-                "record_in_processes": ["main", "content", "socket"],
+                "record_in_processes": ["main", "content"],
                 "alert_emails": ["team@mozilla.xyz"],
                 "bug_numbers": [1383793],
                 "expires_in_version": "never",
                 "kind": "boolean",
                 "description": "Test histogram"
             }
         }
         histograms = load_histogram(SAMPLE_HISTOGRAM)
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -732,20 +732,19 @@ nsXULAppInfo::GetWidgetToolkit(nsACStrin
 SYNC_ENUMS(DEFAULT, Default)
 SYNC_ENUMS(PLUGIN, Plugin)
 SYNC_ENUMS(CONTENT, Content)
 SYNC_ENUMS(IPDLUNITTEST, IPDLUnitTest)
 SYNC_ENUMS(GMPLUGIN, GMPlugin)
 SYNC_ENUMS(GPU, GPU)
 SYNC_ENUMS(VR, VR)
 SYNC_ENUMS(RDD, RDD)
-SYNC_ENUMS(SOCKET, Socket)
 
 // .. and ensure that that is all of them:
-static_assert(GeckoProcessType_Socket + 1 == GeckoProcessType_End,
+static_assert(GeckoProcessType_RDD + 1 == GeckoProcessType_End,
               "Did not find the final GeckoProcessType");
 
 NS_IMETHODIMP
 nsXULAppInfo::GetProcessType(uint32_t* aResult) {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = XRE_GetProcessType();
   return NS_OK;
 }
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -76,17 +76,16 @@
 
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/XPCShellEnvironment.h"
 #include "mozilla/Scheduler.h"
 #include "mozilla/WindowsDllBlocklist.h"
 
 #include "GMPProcessChild.h"
 #include "mozilla/gfx/GPUProcessImpl.h"
-#include "mozilla/net/SocketProcessImpl.h"
 
 #include "GeckoProfiler.h"
 
 #if defined(MOZ_SANDBOX) && defined(XP_WIN)
 #include "mozilla/sandboxTarget.h"
 #include "mozilla/sandboxing/loggingCallbacks.h"
 #endif
 
@@ -221,18 +220,18 @@ namespace mozilla {
 namespace startup {
 GeckoProcessType sChildProcessType = GeckoProcessType_Default;
 }  // namespace startup
 }  // namespace mozilla
 
 #if defined(MOZ_WIDGET_ANDROID)
 void XRE_SetAndroidChildFds(JNIEnv* env, const XRE_AndroidChildFds& fds) {
   mozilla::jni::SetGeckoThreadEnv(env);
-  mozilla::ipc::SetPrefsFd(fds.mPrefsFd);
-  mozilla::ipc::SetPrefMapFd(fds.mPrefMapFd);
+  mozilla::dom::SetPrefsFd(fds.mPrefsFd);
+  mozilla::dom::SetPrefMapFd(fds.mPrefMapFd);
   IPC::Channel::SetClientChannelFd(fds.mIpcFd);
   CrashReporter::SetNotificationPipeForChild(fds.mCrashFd);
   CrashReporter::SetCrashAnnotationPipeForChild(fds.mCrashAnnotationFd);
 }
 #endif  // defined(MOZ_WIDGET_ANDROID)
 
 void XRE_SetProcessType(const char* aProcessTypeString) {
   static bool called = false;
@@ -630,17 +629,16 @@ nsresult XRE_InitChildProcess(int aArgc,
   }
 
   MessageLoop::Type uiLoopType;
   switch (XRE_GetProcessType()) {
     case GeckoProcessType_Content:
     case GeckoProcessType_GPU:
     case GeckoProcessType_VR:
     case GeckoProcessType_RDD:
-    case GeckoProcessType_Socket:
       // Content processes need the XPCOM/chromium frankenventloop
       uiLoopType = MessageLoop::TYPE_MOZILLA_CHILD;
       break;
     case GeckoProcessType_GMPlugin:
       uiLoopType = MessageLoop::TYPE_DEFAULT;
       break;
     default:
       uiLoopType = MessageLoop::TYPE_UI;
@@ -700,20 +698,16 @@ nsresult XRE_InitChildProcess(int aArgc,
         case GeckoProcessType_VR:
           process = new gfx::VRProcessChild(parentPID);
           break;
 
         case GeckoProcessType_RDD:
           process = new RDDProcessImpl(parentPID);
           break;
 
-        case GeckoProcessType_Socket:
-          process = new net::SocketProcessImpl(parentPID);
-          break;
-
         default:
           MOZ_CRASH("Unknown main thread class");
       }
 
       if (!process->Init(aArgc, aArgv)) {
         return NS_ERROR_FAILURE;
       }
 
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -215,17 +215,16 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../build',
     '/dom/base',
     '/mfbt',
-    '/netwerk/base',
     '/xpcom/ds',
 ]
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
 
 if CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -11,17 +11,16 @@
 #include "nsPrintfCString.h"
 #include "nsProxyRelease.h"
 #include "nsServiceManagerUtils.h"
 #include "nsMemoryReporterManager.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
 #include "nsPIDOMWindow.h"
 #include "nsIObserverService.h"
-#include "nsIOService.h"
 #include "nsIGlobalObject.h"
 #include "nsIXPConnect.h"
 #ifdef MOZ_GECKO_PROFILER
 #include "GeckoProfilerReporter.h"
 #endif
 #if defined(XP_UNIX) || defined(MOZ_DMD)
 #include "nsMemoryInfoDumper.h"
 #endif
@@ -1809,23 +1808,16 @@ nsresult nsMemoryReporterManager::StartG
   }
 
   if (RDDProcessManager* rdd = RDDProcessManager::Get()) {
     if (RefPtr<MemoryReportingProcess> proc = rdd->GetProcessMemoryReporter()) {
       s->mChildrenPending.AppendElement(proc.forget());
     }
   }
 
-  if (net::gIOService) {
-    if (RefPtr<MemoryReportingProcess> proc =
-            net::gIOService->GetSocketProcessMemoryReporter()) {
-      s->mChildrenPending.AppendElement(proc.forget());
-    }
-  }
-
   if (!s->mChildrenPending.IsEmpty()) {
     nsCOMPtr<nsITimer> timer;
     rv = NS_NewTimerWithFuncCallback(
         getter_AddRefs(timer), TimeoutCallback, this, kTimeoutLengthMS,
         nsITimer::TYPE_ONE_SHOT,
         "nsMemoryReporterManager::StartGettingReports");
     if (NS_WARN_IF(NS_FAILED(rv))) {
       FinishReporting();
--- a/xpcom/build/GeckoProcessTypes.h
+++ b/xpcom/build/GeckoProcessTypes.h
@@ -21,10 +21,8 @@ GECKO_PROCESS_TYPE(IPDLUnitTest, "ipdlun
 // Gecko Media Plugin process.
 GECKO_PROCESS_TYPE(GMPlugin, "gmplugin", GMPlugin)
 // GPU and compositor process.
 GECKO_PROCESS_TYPE(GPU, "gpu", GPU)
 // VR process.
 GECKO_PROCESS_TYPE(VR, "vr", VR)
 // Remote Data Decoder process.
 GECKO_PROCESS_TYPE(RDD, "rdd", RDD)
-// Socket process
-GECKO_PROCESS_TYPE(Socket, "socket", Socket)
--- a/xpcom/build/nsXULAppAPI.h
+++ b/xpcom/build/nsXULAppAPI.h
@@ -439,18 +439,16 @@ XRE_API(bool, XRE_IsE10sParentProcess, (
  * the e10s parent process or called in the main process when e10s is
  * disabled.
  */
 #define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
   XRE_API(bool, XRE_Is##xre_name##Process, ())
 #include "mozilla/GeckoProcessTypes.h"
 #undef GECKO_PROCESS_TYPE
 
-XRE_API(bool, XRE_IsSocketProcess, ())
-
 /**
  * Returns true if the appshell should run its own native event loop. Returns
  * false if we should rely solely on the Gecko event loop.
  */
 XRE_API(bool, XRE_UseNativeEventProcessing, ())
 
 typedef void (*MainFunction)(void* aData);
 
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -73,17 +73,16 @@ interface nsIXULRuntime : nsISupports
   const unsigned long PROCESS_TYPE_DEFAULT = 0;
   const unsigned long PROCESS_TYPE_PLUGIN = 1;
   const unsigned long PROCESS_TYPE_CONTENT = 2;
   const unsigned long PROCESS_TYPE_IPDLUNITTEST = 3;
   const unsigned long PROCESS_TYPE_GMPLUGIN = 4;
   const unsigned long PROCESS_TYPE_GPU = 5;
   const unsigned long PROCESS_TYPE_VR = 6;
   const unsigned long PROCESS_TYPE_RDD = 7;
-  const unsigned long PROCESS_TYPE_SOCKET = 8;
 
   /**
    * The type of the caller's process.  Returns one of the values above.
    */
   readonly attribute unsigned long processType;
 
   /**
    * The system process ID of the caller's process.