From 74af6d97df22fb90e0c690af470471869e8edda4 Mon Sep 17 00:00:00 2001 From: Nika Layzell Date: Tue, 8 Sep 2020 18:35:37 +0000 Subject: [PATCH] Bug 1661364 - Part 2: Don't recycle web processes with Fission enabled, r=kmag,jesup It is uncommon to have long-lived "web" processes when Fission is enabled, so in general we probably don't want to be performing content process recycling. We also skip recycling web processes when E10s is disabled, as the process preallocator would be disabled in that case, so recycling processes can lead to mochitest-chrome test failures. Differential Revision: https://phabricator.services.mozilla.com/D88626 --- dom/ipc/ContentParent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index cbf67ff5821a..c4b7a8f5c47c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -1980,6 +1980,12 @@ bool ContentParent::TryToRecycle() { return false; } + // Don't bother recycling "web" processes if Fission is enabled, as they + // should be largely unused. + if (mozilla::FissionAutostart()) { + return false; + } + // This life time check should be replaced by a memory health check (memory // usage + fragmentation).