mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 02:34:11 +01:00
Replace expression closures (function expressions - named and dynamic this).
Expression closures are to be axed. See https://bugzil.la/1083458. Leaving deprecated() and literal() calls and method shorthand syntax conversions until after the ESR overlap.
This commit is contained in:
@@ -178,10 +178,13 @@ var Services = Module("Services", {
|
||||
addClass: function addClass(name, class_, ifaces, init, quiet) {
|
||||
this.services[name] = { class: class_, interfaces: Array.concat(ifaces || []), method: "createInstance", init: init, quiet: quiet };
|
||||
if (init)
|
||||
memoize(this.services[name], "callable",
|
||||
function () callable(XPCOMShim(this.interfaces)[this.init]));
|
||||
memoize(this.services[name], "callable", function () {
|
||||
return callable(XPCOMShim(this.interfaces)[this.init]);
|
||||
});
|
||||
|
||||
this[name] = (function Create() this._create(name, arguments)).bind(this);
|
||||
this[name] = (function Create() {
|
||||
return this._create(name, arguments);
|
||||
}).bind(this);
|
||||
update.apply(null, [this[name]].concat([Ci[i] for (i of Array.concat(ifaces))]));
|
||||
return this[name];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user