1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 10:32:27 +01:00

Replace expression closures (function expressions).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-26 03:38:58 +10:00
parent 34bfc2f50f
commit ce82387cdd
35 changed files with 182 additions and 184 deletions

View File

@@ -899,7 +899,7 @@ function Class(...args) {
return Constructor;
}
Class.objectGlobal = function (object) {
Class.objectGlobal = object => {
try {
return Cu.getGlobalForObject(object);
}
@@ -920,7 +920,7 @@ Class.objectGlobal = function (object) {
*/
Class.Property = function Property(desc) update(
Object.create(Property.prototype), desc || { configurable: true, writable: true });
Class.Property.prototype.init = function () {};
Class.Property.prototype.init = () => {};
/**
* Extends a subclass with a superclass. The subclass's
* prototype is replaced with a new object, which inherits
@@ -1059,7 +1059,7 @@ Class.prototype = {
* @returns {nsITimer} The timer which backs this timeout.
*/
timeout: function timeout(callback, timeout) {
let timeout_notify = (timer) => {
let timeout_notify = timer => {
if (this.stale ||
util.rehashing && !isinstance(Cu.getGlobalForObject(callback), ["BackstagePass"]))
return;
@@ -1095,7 +1095,7 @@ Class.prototype = {
for (let i = 0; i < arguments.length; i++) {
let src = arguments[i];
Object.getOwnPropertyNames(src || {}).forEach((k) => {
Object.getOwnPropertyNames(src || {}).forEach(k => {
if (k.startsWith("@@") && k.slice(2) in Symbol)
k = Symbol[k.slice(2)];