Bug 1661462 - Add a pref to control min timeout delays in background windows before throttling has started, r=farre

Differential Revision: https://phabricator.services.mozilla.com/D88414
This commit is contained in:
Olli Pettay 2020-08-27 14:58:21 +00:00
Родитель 8d57cb4b02
Коммит 8206cc1db2
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -249,7 +249,11 @@ TimeDuration TimeoutManager::MinSchedulingDelay() const {
double factor = 1.0 / GetRegenerationFactor(mWindow.IsBackgroundInternal());
return TimeDuration::Max(unthrottled, -mExecutionBudget.MultDouble(factor));
}
//
if (!mThrottleTimeouts && isBackground) {
return TimeDuration::FromMilliseconds(
StaticPrefs::dom_min_background_timeout_value_before_throttling());
}
return unthrottled;
}

Просмотреть файл

@ -2159,6 +2159,12 @@
value: 1000
mirror: always
# Timeout clamp in ms for background windows before throttling has started.
- name: dom.min_background_timeout_value_before_throttling
type: int32_t
value: 1000
mirror: always
# Are missing-property use counters for certain DOM attributes enabled?
- name: dom.missing_prop_counters.enabled
type: bool