From 69e3817eb64c0621703be05cb1bcfcc76d97dd77 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 15 Sep 2017 11:41:49 +0200 Subject: [PATCH] tor-browser-bundle-bin: optionally disable multiprocess support Multiprocess tabs always crash, as first reported by the issue mentioned below. It is now consistently reproducible both on NixOS and non-NixOS for me, so I've decided to add a toggle to conveniently disable multiprocess support as a work-around. Closes https://github.com/NixOS/nixpkgs/issues/27759 but does not really fix the underlying problem ... --- .../browsers/tor-browser-bundle-bin/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index b91b789a22b..1e61cabb7a1 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -44,6 +44,10 @@ , hicolor_icon_theme , shared_mime_info +# Whether to disable multiprocess support to work around crashing tabs +# TODO: fix the underlying problem instead of this terrible work-around +, disableContentSandbox ? true + # Extra preferences , extraPrefs ? "" }: @@ -210,6 +214,10 @@ stdenv.mkDerivation rec { lockPref("extensions.torlauncher.control_port_use_ipc", true); lockPref("extensions.torlauncher.socks_port_use_ipc", true); + // Optionally disable multiprocess support. We always set this to ensure that + // toggling the pref takes effect. + lockPref("browser.tabs.remote.autostart.2", ${if disableContentSandbox then "false" else "true"}); + ${optionalString (extraPrefs != "") '' ${extraPrefs} ''}