1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 12:54:12 +01:00

Replace expression closures (getters).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-27 04:42:30 +10:00
parent ce82387cdd
commit 6e8040286a
48 changed files with 808 additions and 532 deletions

View File

@@ -33,9 +33,13 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
this.branches = memoize({
__proto__: this,
get original() this.constructor(this.ORIGINAL + this.root),
get restore() this.constructor(this.RESTORE + this.root),
get saved() this.constructor(this.SAVED + this.root)
get original() {
return this.constructor(this.ORIGINAL + this.root);
},
get restore() {
return this.constructor(this.RESTORE + this.root);
},
get saved() { return this.constructor(this.SAVED + this.root); }
});
if (!defaults)
@@ -90,7 +94,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
/**
* Returns the full name of this object's preference branch.
*/
get root() this.branch.root,
get root() { return this.branch.root; },
/**
* Returns the value of the preference *name*, or *defaultValue* if