X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fmodules%2Faddons.jsm;fp=common%2Fmodules%2Faddons.jsm;h=b42db8d7c4e416ad594ae3949e6ad06ea7bbba0f;hb=0bcd111e64a8cb0f8019a4cb3270fc5b46270a1b;hp=fb1e59616a57e86d8bca74d159e32dfd852512b2;hpb=4385b68da3a031ef7347f966df57b6e52d48ec94;p=dactyl.git diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index fb1e596..b42db8d 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -1,4 +1,4 @@ -// Copyright (c) 2009-2013 Kris Maglione +// Copyright (c) 2009-2014 Kris Maglione // Copyright (c) 2009-2010 by Doug Kearns // // This work is licensed for reuse under an MIT license. Details are @@ -110,7 +110,6 @@ var actions = { name: "extr[ehash]", description: "Reload an extension", action: function (addon) { - util.assert(config.haveGecko("2b"), _("command.notUseful", config.host)); util.flushCache(); util.timeout(function () { addon.userDisabled = true; @@ -165,7 +164,8 @@ var Addon = Class("Addon", { }, commandAllowed: function commandAllowed(cmd) { - util.assert(Set.has(actions, cmd), _("addon.unknownCommand")); + util.assert(hasOwnProperty(actions, cmd), + _("addon.unknownCommand")); let action = actions[cmd]; if ("perm" in action && !(this.permissions & AddonManager["PERM_CAN_" + action.perm.toUpperCase()])) @@ -258,14 +258,14 @@ var AddonList = Class("AddonList", { this.modules = modules; this.filter = filter && filter.toLowerCase(); this.nodes = {}; - this.addons = []; + this.addons = {}; this.ready = false; - AddonManager.getAddonsByTypes(types, this.closure(function (addons) { + AddonManager.getAddonsByTypes(types, addons => { this._addons = addons; if (this.document) this._init(); - })); + }); AddonManager.addAddonListener(this); }, cleanup: function cleanup() { @@ -273,7 +273,7 @@ var AddonList = Class("AddonList", { }, _init: function _init() { - this._addons.forEach(this.closure.addAddon); + this._addons.forEach(this.bound.addAddon); this.ready = true; this.update(); },