diff options
Diffstat (limited to 'remote/shared/RecommendedPreferences.sys.mjs')
-rw-r--r-- | remote/shared/RecommendedPreferences.sys.mjs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/remote/shared/RecommendedPreferences.sys.mjs b/remote/shared/RecommendedPreferences.sys.mjs index d0a7739e52..b52057ee2b 100644 --- a/remote/shared/RecommendedPreferences.sys.mjs +++ b/remote/shared/RecommendedPreferences.sys.mjs @@ -145,6 +145,9 @@ const COMMON_PREFERENCES = new Map([ // Do not redirect user when a milstone upgrade of Firefox is detected ["browser.startup.homepage_override.mstone", "ignore"], + // Unload the previously selected tab immediately + ["browser.tabs.remote.unloadDelayMs", 0], + // Don't unload tabs when available memory is running low ["browser.tabs.unloadOnLowMemory", false], @@ -310,6 +313,9 @@ const COMMON_PREFERENCES = new Map([ // Privacy and Tracking Protection ["privacy.trackingprotection.enabled", false], + // Used to check if recommended preferences are applied + ["remote.prefs.recommended.applied", true], + // Don't do network connections for mitm priming ["security.certerrors.mitm.priming.enabled", false], @@ -362,7 +368,7 @@ export const RecommendedPreferences = { * @param {Map<string, object>=} preferences * Map of preference name to preference value. */ - applyPreferences(preferences) { + applyPreferences(preferences = new Map()) { if (!lazy.useRecommendedPrefs) { // If remote.prefs.recommended is set to false, do not set any preference // here. Needed for our Firefox CI. @@ -374,11 +380,7 @@ export const RecommendedPreferences = { if (!this.isInitialized) { // Merge common preferences and optionally provided preferences in a // single map. Hereby the extra preferences have higher priority. - if (preferences) { - preferences = new Map([...COMMON_PREFERENCES, ...preferences]); - } else { - preferences = COMMON_PREFERENCES; - } + preferences = new Map([...COMMON_PREFERENCES, ...preferences]); Services.obs.addObserver(this, "quit-application"); this.isInitialized = true; |