Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 3201835

Browse files
committed
Bug 1574090 - Make fission.autostart available via StaticPrefs. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D42091 --HG-- extra : moz-landing-system : lando
1 parent adb8141 commit 3201835

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

modules/libpref/init/StaticPrefList.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,13 @@
25662566
# Prefs starting with "fission."
25672567
#---------------------------------------------------------------------------
25682568

2569+
# Whether to enable Fission.
2570+
# Overridden in all.js on RELEASE_OR_BETA in order to add the locked attribute.
2571+
- name: fission.autostart
2572+
type: bool
2573+
value: false
2574+
mirror: always
2575+
25692576
# This pref has no effect within fission windows, it only controls the
25702577
# behaviour within non-fission windows.
25712578
- name: fission.preserve_browsing_contexts

toolkit/components/windowwatcher/nsWindowWatcher.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include "mozilla/NullPrincipal.h"
6363
#include "mozilla/Preferences.h"
6464
#include "mozilla/ResultExtensions.h"
65+
#include "mozilla/StaticPrefs_fission.h"
6566
#include "mozilla/dom/Element.h"
6667
#include "mozilla/dom/Storage.h"
6768
#include "mozilla/dom/ScriptSettings.h"
@@ -474,7 +475,7 @@ nsWindowWatcher::OpenWindowWithRemoteTab(
474475
return NS_ERROR_UNEXPECTED;
475476
}
476477

477-
bool isFissionWindow = Preferences::GetBool("fission.autostart");
478+
bool isFissionWindow = StaticPrefs::fission_autostart();
478479
bool isPrivateBrowsingWindow =
479480
Preferences::GetBool("browser.privatebrowsing.autostart");
480481

@@ -1803,7 +1804,7 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForParent(
18031804
}
18041805

18051806
// Determine whether the window should have remote subframes
1806-
bool fission = Preferences::GetBool("fission.autostart");
1807+
bool fission = StaticPrefs::fission_autostart();
18071808

18081809
if (fission) {
18091810
fission = !WinHasOption(aFeatures, "non-fission", 0, &presenceFlag);

xpfe/appshell/nsAppShellService.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "mozilla/Preferences.h"
4141
#include "mozilla/Services.h"
4242
#include "mozilla/StartupTimeline.h"
43+
#include "mozilla/StaticPrefs_fission.h"
4344
#include "mozilla/intl/LocaleService.h"
4445

4546
#include "nsEmbedCID.h"
@@ -704,7 +705,7 @@ nsresult nsAppShellService::JustCreateTopWindow(
704705
bool isPrivateBrowsingWindow =
705706
Preferences::GetBool("browser.privatebrowsing.autostart");
706707
bool isUsingRemoteTabs = mozilla::BrowserTabsRemoteAutostart();
707-
bool isUsingRemoteSubframes = Preferences::GetBool("fission.autostart");
708+
bool isUsingRemoteSubframes = StaticPrefs::fission_autostart();
708709

709710
if (aChromeMask & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW) {
710711
// Caller requested a private window

0 commit comments

Comments
 (0)