Backed out 7 changesets (bug 1641496) for failures on test_trr.js. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Fri, 05 Jun 2020 01:39:19 +0300
changeset 534028 e2a3fb3559d0243ed070880c443dfd4856cf25d5
parent 534027 46e56d5d462811d45a562c8c736a79ad287ff8dc
child 534029 835bd05cf1352b33b3d3f5ce31dd0d204a4ecc51
push id37481
push userncsoregi@mozilla.com
push dateFri, 05 Jun 2020 04:39:26 +0000
treeherdermozilla-central@fecffba489bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1641496
milestone79.0a1
backs out1c927e612ddacfdb8150dd92465075aa1b8b4b9a
0f1ba77e39423d02691c62b4bddafd4c90ac66b9
a626e86ce5c926f05b66acd0340851efd7e554c5
196381953eac38e9bc69a9c3cb14a29bf31988d7
70b0af678bfddd03ffd3bf2f9175e525a36f3b47
bf41bd8ca89ca423c4c26af71580d683b2d26121
745da0e1cb8056bca329fe36d10dd4a8ee0cac79
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 7 changesets (bug 1641496) for failures on test_trr.js. CLOSED TREE Backed out changeset 1c927e612dda (bug 1641496) Backed out changeset 0f1ba77e3942 (bug 1641496) Backed out changeset a626e86ce5c9 (bug 1641496) Backed out changeset 196381953eac (bug 1641496) Backed out changeset 70b0af678bfd (bug 1641496) Backed out changeset bf41bd8ca89c (bug 1641496) Backed out changeset 745da0e1cb80 (bug 1641496)
browser/components/doh/test/unit/xpcshell.ini
devtools/client/shared/remote-debugging/adb/xpcshell/xpcshell.ini
devtools/shared/security/tests/xpcshell/xpcshell.ini
dom/presentation/tests/xpcshell/xpcshell.ini
image/test/unit/xpcshell.ini
netwerk/base/SSLTokensCache.cpp
netwerk/base/nsIOService.cpp
netwerk/dns/ChildDNSService.cpp
netwerk/dns/DNSRequestChild.cpp
netwerk/dns/DNSRequestParent.cpp
netwerk/dns/PDNSRequestParams.ipdlh
netwerk/dns/TRRServiceParent.cpp
netwerk/protocol/http/HttpBackgroundChannelChild.cpp
netwerk/protocol/http/HttpTransactionChild.cpp
netwerk/protocol/http/HttpTransactionParent.cpp
netwerk/protocol/http/HttpTransactionParent.h
netwerk/protocol/http/PHttpTransaction.ipdl
netwerk/protocol/http/nsHttpActivityDistributor.cpp
netwerk/test/unit/xpcshell.ini
netwerk/test/unit_ipc/xpcshell.ini
testing/xpcshell/runxpcshelltests.py
toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
toolkit/components/extensions/test/xpcshell/xpcshell-content.ini
toolkit/components/mediasniffer/test/unit/xpcshell.ini
--- a/browser/components/doh/test/unit/xpcshell.ini
+++ b/browser/components/doh/test/unit/xpcshell.ini
@@ -2,9 +2,11 @@
 head = head.js
 firefox-appdir = browser
 support-files =
   ../../../../../netwerk/test/unit/http2-ca.pem
 
 [test_DNSLookup.js]
 skip-if = debug # Bug 1617845
 [test_LookupAggregator.js]
+skip-if = socketprocess_networking
 [test_TRRRacer.js]
+skip-if = socketprocess_networking
--- a/devtools/client/shared/remote-debugging/adb/xpcshell/xpcshell.ini
+++ b/devtools/client/shared/remote-debugging/adb/xpcshell/xpcshell.ini
@@ -1,11 +1,11 @@
 [DEFAULT]
 tags = devtools
 head = xpcshell-head.js
 firefox-appdir = browser
-skip-if = toolkit == 'android' || socketprocess_networking
+skip-if = toolkit == 'android'
 support-files =
   adb.py
 
 [test_adb.js]
 run-sequentially = An extension having the same id is installed/uninstalled in different tests
 [test_prepare-tcp-connection.js]
--- a/devtools/shared/security/tests/xpcshell/xpcshell.ini
+++ b/devtools/shared/security/tests/xpcshell/xpcshell.ini
@@ -1,11 +1,11 @@
 [DEFAULT]
 tags = devtools
 head = head_dbg.js
-skip-if = toolkit == 'android' || socketprocess_networking
+skip-if = toolkit == 'android'
 firefox-appdir = browser
 
 support-files=
   testactors.js
 
 [test_encryption.js]
 [test_oob_cert_auth.js]
--- a/dom/presentation/tests/xpcshell/xpcshell.ini
+++ b/dom/presentation/tests/xpcshell/xpcshell.ini
@@ -1,9 +1,9 @@
 [DEFAULT]
 head =
 
 [test_multicast_dns_device_provider.js]
 [test_presentation_device_manager.js]
 [test_presentation_session_transport.js]
 [test_tcp_control_channel.js]
-skip-if = os == "android" || tsan || socketprocess_networking # Bugs 1422582, 1580136, 1450502, 1584360, 1606813
+skip-if = os == "android" || tsan # Bugs 1422582, 1580136, 1450502, 1584360, 1606813
 [test_presentation_state_machine.js]
--- a/image/test/unit/xpcshell.ini
+++ b/image/test/unit/xpcshell.ini
@@ -33,8 +33,9 @@ support-files =
 [test_async_notification.js]
 [test_async_notification_404.js]
 [test_async_notification_animated.js]
 [test_encoder_apng.js]
 [test_encoder_png.js]
 [test_imgtools.js]
 [test_moz_icon_uri.js]
 [test_private_channel.js]
+skip-if = socketprocess_networking
--- a/netwerk/base/SSLTokensCache.cpp
+++ b/netwerk/base/SSLTokensCache.cpp
@@ -71,22 +71,21 @@ void SSLTokensCache::TokenCacheRecord::R
 }
 
 NS_IMPL_ISUPPORTS(SSLTokensCache, nsIMemoryReporter)
 
 // static
 nsresult SSLTokensCache::Init() {
   StaticMutexAutoLock lock(sLock);
 
-  // SSLTokensCache should be only used in parent process and socket process.
-  // Ideally, parent process should not use this when socket process is enabled.
-  // However, some xpcsehll tests may need to create and use sockets directly,
-  // so we still allow to use this in parent process no matter socket process is
-  // enabled or not.
-  if (!(XRE_IsSocketProcess() || XRE_IsParentProcess())) {
+  if (nsIOService::UseSocketProcess()) {
+    if (!XRE_IsSocketProcess()) {
+      return NS_OK;
+    }
+  } else if (!XRE_IsParentProcess()) {
     return NS_OK;
   }
 
   MOZ_ASSERT(!gInstance);
 
   gInstance = new SSLTokensCache();
 
   RegisterWeakMemoryReporter(gInstance);
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -505,22 +505,18 @@ bool nsIOService::UseSocketProcess(bool 
   sUseSocketProcessChecked = true;
   sUseSocketProcess = false;
 
   if (PR_GetEnv("MOZ_DISABLE_SOCKET_PROCESS")) {
     return sUseSocketProcess;
   }
 
   if (StaticPrefs::network_process_enabled()) {
-    if (PR_GetEnv("MOZ_FORCE_USE_SOCKET_PROCESS")) {
-      sUseSocketProcess = true;
-    } else {
-      sUseSocketProcess =
-          StaticPrefs::network_http_network_access_on_socket_process_enabled();
-    }
+    sUseSocketProcess =
+        StaticPrefs::network_http_network_access_on_socket_process_enabled();
   }
   return sUseSocketProcess;
 }
 
 // static
 void nsIOService::NotifySocketProcessPrefsChanged(const char* aName,
                                                   void* aSelf) {
   static_cast<nsIOService*>(aSelf)->NotifySocketProcessPrefsChanged(aName);
--- a/netwerk/dns/ChildDNSService.cpp
+++ b/netwerk/dns/ChildDNSService.cpp
@@ -13,17 +13,16 @@
 #include "nsQueryObject.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/SyncRunnable.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/net/DNSListenerProxy.h"
 #include "mozilla/net/TRRServiceParent.h"
 #include "nsServiceManagerUtils.h"
-#include "prsystem.h"
 
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // ChildDNSService
 //-----------------------------------------------------------------------------
 
@@ -428,25 +427,16 @@ ChildDNSService::GetCurrentTrrMode(uint3
   }
 
   *aMode = mTRRServiceParent->Mode();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ChildDNSService::GetMyHostName(nsACString& result) {
-  if (XRE_IsParentProcess()) {
-    char name[100];
-    if (PR_GetSystemInfo(PR_SI_HOSTNAME, name, sizeof(name)) == PR_SUCCESS) {
-      result = name;
-      return NS_OK;
-    }
-
-    return NS_ERROR_FAILURE;
-  }
   // TODO: get value from parent during PNecko construction?
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 void ChildDNSService::NotifyRequestDone(DNSRequestSender* aDnsRequest) {
   // We need the original flags and listener for the pending requests hash.
   uint32_t originalFlags = aDnsRequest->mFlags & ~RESOLVE_OFFLINE;
   uintptr_t originalListenerAddr =
--- a/netwerk/dns/DNSRequestChild.cpp
+++ b/netwerk/dns/DNSRequestChild.cpp
@@ -47,27 +47,25 @@ class ChildDNSRecord : public nsIDNSReco
   virtual ~ChildDNSRecord() = default;
 
   nsCString mCanonicalName;
   nsTArray<NetAddr> mAddresses;
   uint32_t mCurrent;  // addr iterator
   uint16_t mFlags;
   double mTrrFetchDuration;
   double mTrrFetchDurationNetworkOnly;
-  bool mIsTRR;
 };
 
 NS_IMPL_ISUPPORTS(ChildDNSRecord, nsIDNSRecord)
 
 ChildDNSRecord::ChildDNSRecord(const DNSRecord& reply, uint16_t flags)
     : mCurrent(0), mFlags(flags) {
   mCanonicalName = reply.canonicalName();
   mTrrFetchDuration = reply.trrFetchDuration();
   mTrrFetchDurationNetworkOnly = reply.trrFetchDurationNetworkOnly();
-  mIsTRR = reply.isTRR();
 
   // A shame IPDL gives us no way to grab ownership of array: so copy it.
   const nsTArray<NetAddr>& addrs = reply.addrs();
   mAddresses = addrs.Clone();
 }
 
 //-----------------------------------------------------------------------------
 // ChildDNSRecord::nsIDNSRecord
@@ -80,18 +78,18 @@ ChildDNSRecord::GetCanonicalName(nsACStr
   }
 
   result = mCanonicalName;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ChildDNSRecord::IsTRR(bool* retval) {
-  *retval = mIsTRR;
-  return NS_OK;
+  *retval = false;
+  return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP
 ChildDNSRecord::GetTrrFetchDuration(double* aTime) {
   *aTime = mTrrFetchDuration;
   return NS_OK;
 }
 
--- a/netwerk/dns/DNSRequestParent.cpp
+++ b/netwerk/dns/DNSRequestParent.cpp
@@ -126,23 +126,19 @@ DNSRequestHandler::OnLookupComplete(nsIC
     }
 
     double trrFetchDuration;
     rec->GetTrrFetchDuration(&trrFetchDuration);
 
     double trrFetchDurationNetworkOnly;
     rec->GetTrrFetchDurationNetworkOnly(&trrFetchDurationNetworkOnly);
 
-    bool isTRR = false;
-    rec->IsTRR(&isTRR);
-
     SendLookupCompletedHelper(
-        mIPCActor,
-        DNSRequestResponse(DNSRecord(cname, array, trrFetchDuration,
-                                     trrFetchDurationNetworkOnly, isTRR)));
+        mIPCActor, DNSRequestResponse(DNSRecord(cname, array, trrFetchDuration,
+                                                trrFetchDurationNetworkOnly)));
   } else {
     SendLookupCompletedHelper(mIPCActor, DNSRequestResponse(status));
   }
 
   return NS_OK;
 }
 
 void DNSRequestHandler::OnIPCActorDestroy() { mIPCActor = nullptr; }
--- a/netwerk/dns/PDNSRequestParams.ipdlh
+++ b/netwerk/dns/PDNSRequestParams.ipdlh
@@ -17,17 +17,16 @@ namespace net {
 //-----------------------------------------------------------------------------
 
 struct DNSRecord
 {
   nsCString canonicalName;
   NetAddr[] addrs;
   double trrFetchDuration;
   double trrFetchDurationNetworkOnly;
-  bool isTRR;
 };
 
 union DNSRequestResponse
 {
   DNSRecord;
   IPCTypeRecord; // The result of a by-type query
   nsresult;   // if error
 };
--- a/netwerk/dns/TRRServiceParent.cpp
+++ b/netwerk/dns/TRRServiceParent.cpp
@@ -16,17 +16,17 @@
 #include "nsIObserverService.h"
 #include "nsIOService.h"
 #include "TRRService.h"
 
 namespace mozilla {
 namespace net {
 
 static const char* gTRRUriCallbackPrefs[] = {
-    "network.trr.uri", "network.trr.mode", kRolloutURIPref, kRolloutModePref,
+    "network.trr.uri", "network.trr.mode", kRolloutURIPref, kRolloutURIPref,
     nullptr,
 };
 
 NS_IMPL_ISUPPORTS(TRRServiceParent, nsIObserver, nsISupportsWeakReference)
 
 void TRRServiceParent::Init() {
   MOZ_ASSERT(gIOService);
 
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
@@ -155,25 +155,16 @@ IPCResult HttpBackgroundChannelChild::Re
        "aDataFromSocketProcess=%d]\n",
        this, aDataFromSocketProcess));
   MOZ_ASSERT(OnSocketThread());
 
   if (NS_WARN_IF(!mChannelChild)) {
     return IPC_OK();
   }
 
-  // The HttpTransactionChild in socket process may not know that this request
-  // is cancelled or failed due to the IPC delay. In this case, we should not
-  // forward ODA to HttpChannelChild.
-  nsresult channelStatus;
-  mChannelChild->GetStatus(&channelStatus);
-  if (NS_FAILED(channelStatus)) {
-    return IPC_OK();
-  }
-
   if (IsWaitingOnStartRequest(aDataFromSocketProcess)) {
     LOG(("  > pending until OnStartRequest [offset=%" PRIu64 " count=%" PRIu32
          "]\n",
          aOffset, aCount));
 
     mQueuedRunnables.AppendElement(
         NewRunnableMethod<const nsresult, const nsresult, const uint64_t,
                           const uint32_t, const nsCString, bool>(
--- a/netwerk/protocol/http/HttpTransactionChild.cpp
+++ b/netwerk/protocol/http/HttpTransactionChild.cpp
@@ -470,24 +470,21 @@ HttpTransactionChild::OnStopRequest(nsIR
 
   UniquePtr<nsHttpHeaderArray> headerArray(
       mTransaction->TakeResponseTrailers());
   Maybe<nsHttpHeaderArray> responseTrailers;
   if (headerArray) {
     responseTrailers.emplace(*headerArray);
   }
 
-  int64_t requestSize = mTransaction->GetRequestSize();
-
-  Unused << SendOnStopRequest(aStatus, mTransaction->ResponseIsComplete(),
-                              mTransaction->GetTransferSize(),
-                              ToTimingStructArgs(mTransaction->Timings()),
-                              responseTrailers,
-                              mTransaction->HasStickyConnection(),
-                              mTransactionObserverResult, requestSize);
+  Unused << SendOnStopRequest(
+      aStatus, mTransaction->ResponseIsComplete(),
+      mTransaction->GetTransferSize(),
+      ToTimingStructArgs(mTransaction->Timings()), responseTrailers,
+      mTransaction->HasStickyConnection(), mTransactionObserverResult);
 
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // HttpTransactionChild <nsITransportEventSink>
 //-----------------------------------------------------------------------------
 
--- a/netwerk/protocol/http/HttpTransactionParent.cpp
+++ b/netwerk/protocol/http/HttpTransactionParent.cpp
@@ -484,56 +484,52 @@ void HttpTransactionParent::DoOnDataAvai
   }
 }
 
 mozilla::ipc::IPCResult HttpTransactionParent::RecvOnStopRequest(
     const nsresult& aStatus, const bool& aResponseIsComplete,
     const int64_t& aTransferSize, const TimingStructArgs& aTimings,
     const Maybe<nsHttpHeaderArray>& aResponseTrailers,
     const bool& aHasStickyConn,
-    Maybe<TransactionObserverResult>&& aTransactionObserverResult,
-    const int64_t& aRequestSize) {
+    Maybe<TransactionObserverResult>&& aTransactionObserverResult) {
   LOG(("HttpTransactionParent::RecvOnStopRequest [this=%p status=%" PRIx32
        "]\n",
        this, static_cast<uint32_t>(aStatus)));
   mEventQ->RunOrEnqueue(new NeckoTargetChannelFunctionEvent(
       this, [self = UnsafePtr<HttpTransactionParent>(this), aStatus,
              aResponseIsComplete, aTransferSize, aTimings, aResponseTrailers,
              aHasStickyConn,
-             aTransactionObserverResult{std::move(aTransactionObserverResult)},
-             aRequestSize]() mutable {
+             aTransactionObserverResult{
+                 std::move(aTransactionObserverResult)}]() mutable {
         self->DoOnStopRequest(aStatus, aResponseIsComplete, aTransferSize,
                               aTimings, aResponseTrailers, aHasStickyConn,
-                              std::move(aTransactionObserverResult),
-                              aRequestSize);
+                              std::move(aTransactionObserverResult));
       }));
   return IPC_OK();
 }
 
 void HttpTransactionParent::DoOnStopRequest(
     const nsresult& aStatus, const bool& aResponseIsComplete,
     const int64_t& aTransferSize, const TimingStructArgs& aTimings,
     const Maybe<nsHttpHeaderArray>& aResponseTrailers,
     const bool& aHasStickyConn,
-    Maybe<TransactionObserverResult>&& aTransactionObserverResult,
-    const int64_t& aRequestSize) {
+    Maybe<TransactionObserverResult>&& aTransactionObserverResult) {
   LOG(("HttpTransactionParent::DoOnStopRequest [this=%p]\n", this));
   if (mCanceled) {
     return;
   }
 
   MOZ_ASSERT(!mOnStopRequestCalled, "We should not call OnStopRequest twice");
 
   mStatus = aStatus;
 
   nsCOMPtr<nsIRequest> deathGrip = this;
 
   mResponseIsComplete = aResponseIsComplete;
   mTransferSize = aTransferSize;
-  mRequestSize = aRequestSize;
   TimingStructArgsToTimingsStruct(aTimings, mTimings);
 
   if (aResponseTrailers.isSome()) {
     mResponseTrailers = MakeUnique<nsHttpHeaderArray>(aResponseTrailers.ref());
   }
   mHasStickyConnection = aHasStickyConn;
   if (aTransactionObserverResult.isSome()) {
     TransactionObserverFunc obs = nullptr;
--- a/netwerk/protocol/http/HttpTransactionParent.h
+++ b/netwerk/protocol/http/HttpTransactionParent.h
@@ -57,18 +57,17 @@ class HttpTransactionParent final : publ
   mozilla::ipc::IPCResult RecvOnDataAvailable(
       const nsCString& aData, const uint64_t& aOffset, const uint32_t& aCount,
       const bool& aDataSentToChildProcess);
   mozilla::ipc::IPCResult RecvOnStopRequest(
       const nsresult& aStatus, const bool& aResponseIsComplete,
       const int64_t& aTransferSize, const TimingStructArgs& aTimings,
       const Maybe<nsHttpHeaderArray>& responseTrailers,
       const bool& aHasStickyConn,
-      Maybe<TransactionObserverResult>&& aTransactionObserverResult,
-      const int64_t& aRequestSize);
+      Maybe<TransactionObserverResult>&& aTransactionObserverResult);
   mozilla::ipc::IPCResult RecvOnNetAddrUpdate(const NetAddr& aSelfAddr,
                                               const NetAddr& aPeerAddr,
                                               const bool& aResolvedByTRR);
   mozilla::ipc::IPCResult RecvOnInitFailed(const nsresult& aStatus);
 
   mozilla::ipc::IPCResult RecvOnH2PushStream(const uint32_t& aPushedStreamId,
                                              const nsCString& aResourceUrl,
                                              const nsCString& aRequestString);
@@ -96,18 +95,17 @@ class HttpTransactionParent final : publ
   void DoOnDataAvailable(const nsCString& aData, const uint64_t& aOffset,
                          const uint32_t& aCount,
                          const bool& aDataSentToChildProcess);
   void DoOnStopRequest(
       const nsresult& aStatus, const bool& aResponseIsComplete,
       const int64_t& aTransferSize, const TimingStructArgs& aTimings,
       const Maybe<nsHttpHeaderArray>& responseTrailers,
       const bool& aHasStickyConn,
-      Maybe<TransactionObserverResult>&& aTransactionObserverResult,
-      const int64_t& aRequestSize);
+      Maybe<TransactionObserverResult>&& aTransactionObserverResult);
   void DoNotifyListener();
 
   nsCOMPtr<nsITransportEventSink> mEventsink;
   nsCOMPtr<nsIStreamListener> mChannel;
   nsCOMPtr<nsIEventTarget> mTargetThread;
   nsCOMPtr<nsISupports> mSecurityInfo;
   UniquePtr<nsHttpResponseHead> mResponseHead;
   UniquePtr<nsHttpHeaderArray> mResponseTrailers;
--- a/netwerk/protocol/http/PHttpTransaction.ipdl
+++ b/netwerk/protocol/http/PHttpTransaction.ipdl
@@ -46,18 +46,17 @@ parent:
                         uint32_t  count,
                         bool      dataSentToChildProcess);
   async OnStopRequest(nsresult status,
                       bool responseIsComplete,
                       int64_t transferSize,
                       TimingStructArgs timings,
                       nsHttpHeaderArray? responseTrailers,
                       bool hasStickyConn,
-                      TransactionObserverResult? transactionObserverResult,
-                      int64_t requestSize);
+                      TransactionObserverResult? transactionObserverResult);
   async OnNetAddrUpdate(NetAddr selfAddr, NetAddr peerAddr, bool resolvedByTRR);
   async OnInitFailed(nsresult status);
   async OnH2PushStream(uint32_t pushedStreamId,
                        nsCString resourceUrl,
                        nsCString requestString);
 
 child:
   async __delete__();
--- a/netwerk/protocol/http/nsHttpActivityDistributor.cpp
+++ b/netwerk/protocol/http/nsHttpActivityDistributor.cpp
@@ -147,23 +147,22 @@ nsHttpActivityDistributor::AddObserver(n
     MutexAutoLock lock(mLock);
     wasEmpty = mObservers.IsEmpty();
     // XXX(Bug 1631371) Check if this should use a fallible operation as it
     // pretended earlier.
     mObservers.AppendElement(observer);
   }
 
   if (nsIOService::UseSocketProcess() && wasEmpty) {
-    auto task = []() {
-      SocketProcessParent* parent = SocketProcessParent::GetSingleton();
-      if (parent && parent->CanSend()) {
-        Unused << parent->SendOnHttpActivityDistributorActivated(true);
-      }
-    };
-    gIOService->CallOrWaitForSocketProcess(task);
+    SocketProcessParent* parent = SocketProcessParent::GetSingleton();
+    if (parent && parent->CanSend()) {
+      Unused << parent->SendOnHttpActivityDistributorActivated(true);
+    } else {
+      return NS_ERROR_FAILURE;
+    }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsHttpActivityDistributor::RemoveObserver(nsIHttpActivityObserver* aObserver) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
@@ -173,21 +172,20 @@ nsHttpActivityDistributor::RemoveObserve
   bool isEmpty = false;
   {
     MutexAutoLock lock(mLock);
     if (!mObservers.RemoveElement(observer)) return NS_ERROR_FAILURE;
     isEmpty = mObservers.IsEmpty();
   }
 
   if (nsIOService::UseSocketProcess() && isEmpty) {
-    auto task = []() {
-      SocketProcessParent* parent = SocketProcessParent::GetSingleton();
-      if (parent && parent->CanSend()) {
-        Unused << parent->SendOnHttpActivityDistributorActivated(false);
-      }
-    };
-    gIOService->CallOrWaitForSocketProcess(task);
+    SocketProcessParent* parent = SocketProcessParent::GetSingleton();
+    if (parent && parent->CanSend()) {
+      Unused << parent->SendOnHttpActivityDistributorActivated(false);
+    } else {
+      return NS_ERROR_FAILURE;
+    }
   }
   return NS_OK;
 }
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/test/unit/xpcshell.ini
+++ b/netwerk/test/unit/xpcshell.ini
@@ -294,24 +294,26 @@ skip-if = true # Causes sporatic oranges
 [test_resumable_truncate.js]
 [test_safeoutputstream.js]
 [test_schema_2_migration.js]
 [test_schema_3_migration.js]
 [test_schema_10_migration.js]
 [test_simple.js]
 [test_sockettransportsvc_available.js]
 [test_socks.js]
-skip-if = (os == 'mac' && (verify || debug || os_version == '10.14')) || socketprocess_networking #Bug 1140656
+skip-if = os == 'mac' && (verify || debug || os_version == '10.14') #Bug 1140656
 # Bug 675039: test fails consistently on Android
 fail-if = os == "android"
 # http2 unit tests require us to have node available to run the spdy and http2 server
 [test_http2.js]
 run-sequentially = node server exceptions dont replay well
+skip-if = socketprocess_networking
 [test_altsvc.js]
 run-sequentially = node server exceptions dont replay well
+skip-if = socketprocess_networking
 [test_speculative_connect.js]
 [test_standardurl.js]
 [test_standardurl_default_port.js]
 [test_standardurl_port.js]
 [test_streamcopier.js]
 [test_traceable_channel.js]
 [test_unescapestring.js]
 [test_xmlhttprequest.js]
@@ -326,37 +328,37 @@ run-sequentially = Hardcoded hash value 
 [test_tldservice_nextsubdomain.js]
 [test_about_protocol.js]
 [test_bug856978.js]
 [test_unix_domain.js]
 [test_addr_in_use_error.js]
 [test_about_networking.js]
 skip-if = socketprocess_networking
 [test_ping_aboutnetworking.js]
-skip-if = (verify && (os == 'mac')) || socketprocess_networking
+skip-if = (verify && (os == 'mac'))
 [test_referrer.js]
 [test_referrer_cross_origin.js]
 [test_referrer_policy.js]
 [test_predictor.js]
+skip-if = socketprocess_networking
 [test_signature_extraction.js]
 skip-if = os != "win"
 [test_synthesized_response.js]
 [test_udp_multicast.js]
 [test_redirect_history.js]
 [test_reply_without_content_type.js]
 [test_websocket_offline.js]
 [test_be_conservative.js]
 firefox-appdir = browser
 [test_be_conservative_error_handling.js]
 firefox-appdir = browser
+skip-if = socketprocess_networking
 [test_tls_server.js]
 firefox-appdir = browser
-skip-if = socketprocess_networking
 [test_tls_server_multiple_clients.js]
-skip-if = socketprocess_networking
 [test_1073747.js]
 [test_safeoutputstream_append.js]
 [test_suspend_channel_before_connect.js]
 [test_suspend_channel_on_examine.js]
 [test_suspend_channel_on_modified.js]
 [test_inhibit_caching.js]
 [test_dns_disable_ipv4.js]
 [test_dns_disable_ipv6.js]
@@ -364,73 +366,78 @@ skip-if = socketprocess_networking
 [test_cookie_blacklist.js]
 [test_getHost.js]
 [test_bug412457.js]
 skip-if = appname == "thunderbird"
 [test_bug464591.js]
 skip-if = appname == "thunderbird"
 [test_alt-data_simple.js]
 [test_alt-data_stream.js]
+skip-if = socketprocess_networking
 [test_alt-data_too_big.js]
 [test_alt-data_overwrite.js]
 [test_alt-data_closeWithStatus.js]
 [test_cache-control_request.js]
 [test_bug1279246.js]
 [test_throttlequeue.js]
 [test_throttlechannel.js]
 [test_throttling.js]
+skip-if = socketprocess_networking
 [test_separate_connections.js]
 [test_trackingProtection_annotateChannels.js]
 [test_race_cache_with_network.js]
-skip-if = (verify && !debug && (os == 'win'))
+skip-if = (verify && !debug && (os == 'win')) || socketprocess_networking
 [test_rcwn_always_cache_new_content.js]
 [test_channel_priority.js]
 [test_bug1312774_http1.js]
 [test_bug1312782_http1.js]
 [test_bug1355539_http1.js]
 [test_bug1378385_http1.js]
 [test_tls_flags_separate_connections.js]
 [test_tls_flags.js]
 skip-if = (verify && (os == 'linux')) || (os == "android" && processor == "x86_64")
 [test_uri_mutator.js]
 [test_bug1411316_http1.js]
 [test_header_Server_Timing.js]
 run-sequentially = node server exceptions dont replay well
 [test_trr.js]
 # test_trr.js is not working in Thunderbird due to bug 1608066.
-skip-if = appname == "thunderbird"
+skip-if = appname == "thunderbird" || socketprocess_networking
 [test_ioservice.js]
 [test_substituting_protocol_handler.js]
 [test_proxyconnect.js]
 skip-if = tsan || socketprocess_networking # Bug 1614708
 [test_captive_portal_service.js]
 run-sequentially = node server exceptions dont replay well
 skip-if = socketprocess_networking
 [test_esni_dns_fetch.js]
+skip-if = socketprocess_networking
 [test_network_connectivity_service.js]
 [test_suspend_channel_on_authRetry.js]
 [test_suspend_channel_on_examine_merged_response.js]
 [test_bug1527293.js]
 [test_stale-while-revalidate_negative.js]
 [test_stale-while-revalidate_positive.js]
 [test_stale-while-revalidate_loop.js]
 [test_stale-while-revalidate_max-age-0.js]
 [test_http1-proxy.js]
 [test_http2-proxy.js]
 run-sequentially = one http2 node proxy is used for all tests, this test is using global session counter
 skip-if = os == "android"
 [test_head_request_no_response_body.js]
+skip-if = socketprocess_networking
 [test_disabled_ftp.js]
 [test_cache_204_response.js]
+skip-if = socketprocess_networking
 [test_http3.js]
 # disabled for now due to intermittent failures caused by neqo bugs
 skip-if = true || asan || tsan || os == 'win' || os =='android'
 [test_node_execute.js]
 [test_loadgroup_cancel.js]
 [test_obs-fold.js]
 [test_defaultURI.js]
 [test_port_remapping.js]
 [test_dns_override.js]
-skip-if = socketprocess_networking
 [test_no_cookies_after_last_pb_exit.js]
 [test_trr_httpssvc.js]
+skip-if = socketprocess_networking
 [test_trr_case_sensitivity.js]
-skip-if = os == "android" || verify
+skip-if = os == "android" || verify || socketprocess_networking
--- a/netwerk/test/unit_ipc/xpcshell.ini
+++ b/netwerk/test/unit_ipc/xpcshell.ini
@@ -60,16 +60,17 @@ support-files =
   !/netwerk/test/unit/test_alt-data_cross_process.js
   !/netwerk/test/unit/test_httpcancel.js
   !/netwerk/test/unit/test_trr_httpssvc.js
   child_cookie_header.js
   child_esni_dns_fetch1.js
 
 [test_cookie_header_stripped.js]
 [test_cacheflags_wrap.js]
+skip-if = socketprocess_networking
 [test_cache-entry-id_wrap.js]
 [test_cache_jar_wrap.js]
 [test_channel_close_wrap.js]
 [test_cookiejars_wrap.js]
 [test_dns_cancel_wrap.js]
 [test_dns_service_wrap.js]
 [test_duplicate_headers_wrap.js]
 [test_event_sink_wrap.js]
@@ -86,28 +87,32 @@ support-files =
 [test_redirect_failure_wrap.js]
 # Do not test the channel.redirectTo() API under e10s until 827269 is resolved
 [test_redirect_from_script_wrap.js]
 skip-if = true
 [test_redirect_passing_wrap.js]
 [test_redirect_different-protocol_wrap.js]
 [test_reentrancy_wrap.js]
 [test_resumable_channel_wrap.js]
+skip-if = socketprocess_networking
 [test_simple_wrap.js]
 [test_synthesized_response_wrap.js]
 [test_xmlhttprequest_wrap.js]
 [test_XHR_redirects.js]
 [test_redirect_history_wrap.js]
 [test_reply_without_content_type_wrap.js]
 [test_getHost_wrap.js]
 [test_alt-data_simple_wrap.js]
 [test_alt-data_stream_wrap.js]
+skip-if = socketprocess_networking
 [test_alt-data_closeWithStatus_wrap.js]
 [test_original_sent_received_head_wrap.js]
 [test_channel_id.js]
 [test_trackingProtection_annotateChannels_wrap1.js]
 [test_trackingProtection_annotateChannels_wrap2.js]
 [test_channel_priority_wrap.js]
 [test_multipart_streamconv_wrap.js]
 [test_alt-data_cross_process_wrap.js]
 [test_httpcancel_wrap.js]
 [test_esni_dns_fetch_wrap.js]
+skip-if = socketprocess_networking
 [test_trr_httpssvc_wrap.js]
+skip-if = socketprocess_networking
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1072,21 +1072,16 @@ class XPCShellTests(object):
 
         # Disable the content process sandbox for the xpcshell tests. They
         # currently attempt to do things like bind() sockets, which is not
         # compatible with the sandbox.
         self.env["MOZ_DISABLE_CONTENT_SANDBOX"] = "1"
 
         self.env["MOZ_DISABLE_SOCKET_PROCESS_SANDBOX"] = "1"
 
-        if self.mozInfo.get("socketprocess_networking"):
-            self.env["MOZ_FORCE_USE_SOCKET_PROCESS"] = "1"
-        else:
-            self.env["MOZ_DISABLE_SOCKET_PROCESS"] = "1"
-
         if self.enable_webrender:
             self.env["MOZ_WEBRENDER"] = "1"
             self.env["MOZ_ACCELERATED"] = "1"
         else:
             self.env["MOZ_WEBRENDER"] = "0"
 
     def buildEnvironment(self):
         """
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
@@ -51,16 +51,17 @@ skip-if = os == 'android' && debug # The
 [test_ext_contentscript_restrictSchemes.js]
 [test_ext_contentscript_teardown.js]
 [test_ext_contentscript_unregister_during_loadContentScript.js]
 [test_ext_contentscript_xml_prettyprint.js]
 [test_ext_contextual_identities.js]
 skip-if = appname == "thunderbird" || os == "android" # Containers are not exposed to android.
 [test_ext_debugging_utils.js]
 [test_ext_dns.js]
+skip-if = socketprocess_networking
 [test_ext_downloads.js]
 skip-if = appname == "thunderbird"
 [test_ext_downloads_download.js]
 skip-if = appname == "thunderbird" || os == "android" || tsan # tsan: bug 1612707
 [test_ext_downloads_misc.js]
 skip-if = appname == "thunderbird" || os == "android" || (os=='linux' && bits==32) || tsan # linux32: bug 1324870, tsan: bug 1612707
 [test_ext_downloads_private.js]
 skip-if = appname == "thunderbird" || os == "android"
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-content.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-content.ini
@@ -1,16 +1,16 @@
 [test_ext_i18n.js]
 skip-if = os == "android" || (os == "win" && debug) || (os == "linux")
 [test_ext_i18n_css.js]
 [test_ext_contentscript.js]
 [test_ext_contentscript_about_blank_start.js]
 [test_ext_contentscript_canvas_tainting.js]
 [test_ext_contentscript_scriptCreated.js]
 [test_ext_contentscript_triggeringPrincipal.js]
-skip-if = (os == "android" && debug) || (os == "win" && debug) || tsan || socketprocess_networking # Windows: Bug 1438796, tsan: bug 1612707
+skip-if = (os == "android" && debug) || (os == "win" && debug) || tsan # Windows: Bug 1438796, tsan: bug 1612707
 [test_ext_contentscript_xrays.js]
 [test_ext_contentScripts_register.js]
 [test_ext_contexts_gc.js]
 [test_ext_adoption_with_xrays.js]
 [test_ext_shadowdom.js]
 skip-if = ccov && os == 'linux' # bug 1607581
 [test_ext_web_accessible_resources.js]
--- a/toolkit/components/mediasniffer/test/unit/xpcshell.ini
+++ b/toolkit/components/mediasniffer/test/unit/xpcshell.ini
@@ -10,9 +10,10 @@ support-files =
   data/fl10.mp2
   data/he_free.mp3
   data/id3tags.mp3
   data/notags-bad.mp3
   data/notags-scan.mp3
   data/notags.mp3
 
 [test_mediasniffer.js]
+skip-if = socketprocess_networking
 [test_mediasniffer_ext.js]