Unverified Commit 80749f18 authored by Georg Koppen's avatar Georg Koppen
Browse files

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
parent 30fee1c7
......@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment