mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 00:32:30 +02:00
Fix some Print to File issues.
This commit is contained in:
1 parent
56cb59cdc7
commit
5db5e74ad7
2 files changed
+17
-8
No files matched your search
@@ -210,11 +210,8 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
* @param {value} value The new preference value.
|
||||
*/
|
||||
set: function (name, value) {
|
||||
if (this._prefContexts.length) {
|
||||
let val = this.get(name, null);
|
||||
if (val != null)
|
||||
this._prefContexts[this._prefContexts.length - 1][name] = val;
|
||||
}
|
||||
if (this._prefContexts.length)
|
||||
this._prefContexts[this._prefContexts.length - 1][name] = this.get(name, null);
|
||||
|
||||
function assertType(needType)
|
||||
util.assert(type === Ci.nsIPrefBranch.PREF_INVALID || type === needType,
|
||||
@@ -240,7 +237,10 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
this.branch.setBoolPref(name, value);
|
||||
break;
|
||||
default:
|
||||
throw FailedAssertion("Unknown preference type: " + typeof value + " (" + name + "=" + value + ")");
|
||||
if (value == null && this != this.defaults)
|
||||
this.reset(name);
|
||||
else
|
||||
throw FailedAssertion("Unknown preference type: " + typeof value + " (" + name + "=" + value + ")");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user