From a2c5c5d3b6e3f6558e887a611219f80899b861b6 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Thu, 28 Apr 2022 16:53:24 +0000 Subject: [PATCH] Bug 1766132 - Use right process behaviour with BFCache in parent. r=smaug Because we rely on the process switching code for replacing the frameloaders for BFCache in the parent, we need to force the process switch behaviour to PROCESS_BEHAVIOR_STANDARD if BFCache in the parent is on. Differential Revision: https://phabricator.services.mozilla.com/D144518 --- netwerk/ipc/DocumentLoadListener.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp index 1c7301e960b9..717ae6dd1214 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp @@ -1546,8 +1546,10 @@ static DocumentLoadListener::ProcessBehavior GetProcessSwitchBehavior( bool isRemoteBrowser = false; browser->GetIsRemoteBrowser(&isRemoteBrowser); if (isRemoteBrowser) { - return DocumentLoadListener::ProcessBehavior:: - PROCESS_BEHAVIOR_SUBFRAME_ONLY; + return mozilla::BFCacheInParent() ? DocumentLoadListener::ProcessBehavior:: + PROCESS_BEHAVIOR_STANDARD + : DocumentLoadListener::ProcessBehavior:: + PROCESS_BEHAVIOR_SUBFRAME_ONLY; } return DocumentLoadListener::ProcessBehavior::PROCESS_BEHAVIOR_DISABLED; }