@@ -44,6 +44,10 @@
4444, hicolor_icon_theme
4545, shared_mime_info
4646
47+# Whether to disable multiprocess support to work around crashing tabs
48+# TODO: fix the underlying problem instead of this terrible work-around
49+, disableContentSandbox ? true
50+
4751# Extra preferences
4852, extraPrefs ? ""
4953}:
@@ -210,6 +214,10 @@ stdenv.mkDerivation rec {
210214 lockPref("extensions.torlauncher.control_port_use_ipc", true);
211215 lockPref("extensions.torlauncher.socks_port_use_ipc", true);
212216
217+ // Optionally disable multiprocess support. We always set this to ensure that
218+ // toggling the pref takes effect.
219+ lockPref("browser.tabs.remote.autostart.2", ${if disableContentSandbox then "false" else "true"});
220+
213221 ${optionalString (extraPrefs != "") ''
214222 ${extraPrefs}
215223 ''}