[tbb-commits] [tor-launcher/master] Bug 28039: Enable dump() if log method is 0

gk at torproject.org gk at torproject.org
Fri Nov 9 09:28:32 UTC 2018


commit 80749f18beb93f94cb6be9a5e2c17438ff133ab8
Author: Georg Koppen <gk at torproject.org>
Date:   Mon Oct 22 11:40:28 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 Torbutton 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/modules/tl-logger.jsm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/modules/tl-logger.jsm b/src/modules/tl-logger.jsm
index a2ea404..551ad92 100644
--- a/src/modules/tl-logger.jsm
+++ b/src/modules/tl-logger.jsm
@@ -151,6 +151,14 @@ let TLLoggerInternal = // Private
       case "extensions.torlauncher.logmethod":
         this.mLogMethod = TorLauncherUtil.getIntPref(
                                        "extensions.torlauncher.logmethod");
+        if (this.mLogMethod === 0) {
+          TorLauncherUtil.setBoolPref("browser.dom.window.dump.enabled", true);
+        } else if (TorLauncherUtil.
+          getIntPref("extensions.torbutton.logmethod", 3) !== 0) {
+          // If Torbutton is not available or its log method is not 0
+          // then let's reset the dump pref.
+          TorLauncherUtil.setBoolPref("browser.dom.window.dump.enabled", false);
+        }
         break;
       case "extensions.torlauncher.loglevel":
         this.mLogLevel = TorLauncherUtil.getIntPref(



More information about the tbb-commits mailing list