commit 923fd8500a16b0a343450621a62ea10175c38b3d Author: Georg Koppen gk@torproject.org Date: Mon Oct 22 11:37:19 2018 +0000
Bug 28039: Enable dump() if log method is 0
Without setting `browser.dom.window.dump.enabled` explicitly to `true` it is not possible anymore to capture output in the terminal when the log method is set to 0. We make sure that `browser.dom.window.dump.enabled` is set to `true` in that case and disable it again otherwise, unless Tor Launcher has enabled logging in a terminal as well.
For context see: https://bugzilla.mozilla.org/show_bug.cgi?id=379797 https://bugzilla.mozilla.org/show_bug.cgi?id=1395711 --- src/components/torbutton-logger.js | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/components/torbutton-logger.js b/src/components/torbutton-logger.js index b25d039b..fdf7bb7d 100644 --- a/src/components/torbutton-logger.js +++ b/src/components/torbutton-logger.js @@ -154,6 +154,16 @@ TorbuttonLogger.prototype = switch (data) { case "extensions.torbutton.logmethod": this.logmethod = Services.prefs.getIntPref("extensions.torbutton.logmethod"); + if (this.logmethod === 0) { + Services.prefs.setBoolPref("browser.dom.window.dump.enabled", + true); + } else if (Services.prefs. + getIntPref("extensions.torlauncher.logmethod", 3) !== 0) { + // If Tor Launcher is not available or its log method is not 0 + // then let's reset the dump pref. + Services.prefs.setBoolPref("browser.dom.window.dump.enabled", + false); + } break; case "extensions.torbutton.loglevel": this.loglevel = Services.prefs.getIntPref("extensions.torbutton.loglevel");
tor-commits@lists.torproject.org