Bug 1785162 - [3/3] stall for half time in non-main processes r=gsvelto

Retain the full stall period in the main process; stall for only half as
long in all other processes.

Differential Revision: https://phabricator.services.mozilla.com/D157140
This commit is contained in:
Ray Kraesig 2022-09-22 15:01:42 +00:00
parent adac61618a
commit 310ef2663b

View File

@ -1404,8 +1404,18 @@ static inline StallSpecs GetStallSpecs() {
// though, so it's probably not going to matter whether we stall here or not.)
return maxStall;
# elif defined(NIGHTLY_BUILD)
// On Nightly, always stall, for experiment's sake (bug 1785162).
return maxStall;
// On Nightly, partly for experiment's sake (bug 1785162):
//
switch (GetGeckoProcessType()) {
// For the main process, stall for the maximum permissible time period. (The
// main process is the most important one to keep alive.)
case GeckoProcessType::GeckoProcessType_Default:
return maxStall;
// For all other process types, stall for at most half as long.
default:
return {.maxAttempts = kMaxAttempts / 2, .delayMs = kDelayMs};
}
# else
// In the main process, always stall.
if (GetGeckoProcessType() == GeckoProcessType::GeckoProcessType_Default) {