diff --git a/devtools/client/aboutdebugging/test/head.js b/devtools/client/aboutdebugging/test/head.js index 109e42c3ea56..8ea562fe1d1a 100644 --- a/devtools/client/aboutdebugging/test/head.js +++ b/devtools/client/aboutdebugging/test/head.js @@ -433,5 +433,6 @@ function enableServiceWorkerDebugging() { ["dom.ipc.processCount", 1], ]}; SpecialPowers.pushPrefEnv(options, done); + Services.ppmm.releaseCachedProcesses(); }); } diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 01cf04883a1a..281c608a25dd 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -746,6 +746,10 @@ ContentParent::IsMaxProcessCountReached(const nsAString& aContentProcessType) /*static*/ void ContentParent::ReleaseCachedProcesses() { + if (!GetPoolSize(NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE))) { + return; + } + // We might want to extend this for other process types as well in the future... nsTArray& contentParents = GetOrCreatePool(NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE)); ContentProcessManager* cpm = ContentProcessManager::GetSingleton();