diff --git a/common/modules/base.jsm b/common/modules/base.jsm index d60f70f2..4f88164c 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -230,9 +230,9 @@ Runnable.prototype.QueryInterface = XPCOMUtils.generateQI([Ci.nsIRunnable]); */ function debuggerProperties(obj) { if (loaded.services && services.debugger.isOn) { - let ret = {}; - services.debugger.wrapValue(obj).getProperties(ret, {}); - return ret.value; + let res = {}; + services.debugger.wrapValue(obj).getProperties(res, {}); + return res.value; } } @@ -1487,20 +1487,20 @@ var array = Class("array", Array, { * @returns {Array} */ uniq: function uniq(ary, unsorted) { - let ret = []; + let res = []; if (unsorted) { for (let item in values(ary)) - if (ret.indexOf(item) == -1) - ret.push(item); + if (res.indexOf(item) == -1) + res.push(item); } else { for (let [, item] in Iterator(ary.sort())) { - if (item != last || !ret.length) - ret.push(item); + if (item != last || !res.length) + res.push(item); var last = item; } } - return ret; + return res; }, /** diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index a2c18266..7d9eeff5 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -180,8 +180,7 @@ var JavaScript = Module("javascript", { this._top.statements.pop(); this._top = this._get(-2); this._last = this._top.char; - let ret = this._stack.pop(); - return ret; + return this._stack.pop(); }, _buildStack: function (filter) { diff --git a/common/modules/options.jsm b/common/modules/options.jsm index 4717b5e8..31684cba 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -872,54 +872,54 @@ var Options = Module("options", { * @returns {Object} The parsed command object. */ parseOpt: function parseOpt(args, modifiers) { - let ret = {}; + let res = {}; let matches, prefix, postfix; - [matches, prefix, ret.name, postfix, ret.valueGiven, ret.operator, ret.value] = + [matches, prefix, res.name, postfix, res.valueGiven, res.operator, res.value] = args.match(/^\s*(no|inv)?([^=]+?)([?&!])?\s*(([-+^]?)=(.*))?\s*$/) || []; - ret.args = args; - ret.onlyNonDefault = false; // used for :set to print non-default options + res.args = args; + res.onlyNonDefault = false; // used for :set to print non-default options if (!args) { - ret.name = "all"; - ret.onlyNonDefault = true; + res.name = "all"; + res.onlyNonDefault = true; } if (matches) { - ret.option = this.get(ret.name, ret.scope); - if (!ret.option && (ret.option = this.get(prefix + ret.name, ret.scope))) { - ret.name = prefix + ret.name; + res.option = this.get(res.name, res.scope); + if (!res.option && (res.option = this.get(prefix + res.name, res.scope))) { + res.name = prefix + res.name; prefix = ""; } } - ret.prefix = prefix; - ret.postfix = postfix; + res.prefix = prefix; + res.postfix = postfix; - ret.all = (ret.name == "all"); - ret.get = (ret.all || postfix == "?" || (ret.option && ret.option.type != "boolean" && !ret.valueGiven)); - ret.invert = (prefix == "inv" || postfix == "!"); - ret.reset = (postfix == "&"); - ret.unsetBoolean = (prefix == "no"); + res.all = (res.name == "all"); + res.get = (res.all || postfix == "?" || (res.option && res.option.type != "boolean" && !res.valueGiven)); + res.invert = (prefix == "inv" || postfix == "!"); + res.reset = (postfix == "&"); + res.unsetBoolean = (prefix == "no"); - ret.scope = modifiers && modifiers.scope; + res.scope = modifiers && modifiers.scope; - if (!ret.option) - return ret; + if (!res.option) + return res; - if (ret.value === undefined) - ret.value = ""; + if (res.value === undefined) + res.value = ""; - ret.optionValue = ret.option.get(ret.scope); + res.optionValue = res.option.get(res.scope); try { - ret.values = ret.option.parse(ret.value); + res.values = res.option.parse(res.value); } catch (e) { - ret.error = e; + res.error = e; } - return ret; + return res; }, /** diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index eeadf2c7..28ad0e8d 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -83,20 +83,20 @@ var ArrayStore = Class("ArrayStore", StoreBase, { }, pop: function pop(value) { - var ret = this._object.pop(); + var res = this._object.pop(); this.fireEvent("pop", this._object.length); - return ret; + return res; }, truncate: function truncate(length, fromEnd) { - var ret = this._object.length; + var res = this._object.length; if (this._object.length > length) { if (fromEnd) this._object.splice(0, this._object.length - length); this._object.length = length; this.fireEvent("truncate", length); } - return ret; + return res; }, // XXX: Awkward. diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 702876fe..c08e98ba 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -90,19 +90,19 @@ var Template = Module("Template", { XML.ignoreWhitespace = false; XML.prettyPrinting = false; if (iter.length) // FIXME: Kludge? iter = array.iterValues(iter); - let ret = <>; + let res = <>; let n = 0; for each (let i in Iterator(iter)) { let val = func(i, n); if (val == undefined) continue; if (n++ && sep) - ret += sep; + res += sep; if (interruptable && n % interruptable == 0) util.threadYield(true, true); - ret += val; + res += val; } - return ret; + return res; }, bindings: { diff --git a/teledactyl/content/mail.js b/teledactyl/content/mail.js index 9e3147eb..ff01820c 100644 --- a/teledactyl/content/mail.js +++ b/teledactyl/content/mail.js @@ -132,15 +132,15 @@ const Mail = Module("mail", { /** @property {nsISmtpServer[]} The list of configured SMTP servers. */ get smtpServers() { let servers = services.smtp.smtpServers; - let ret = []; + let res = []; while (servers.hasMoreElements()) { let server = servers.getNext(); if (server instanceof Ci.nsISmtpServer) - ret.push(server); + res.push(server); } - return ret; + return res; }, composeNewMail: function (args) {