diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-03-14 19:55:17 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-03-14 19:55:17 -0400 |
commit | fc410045b445c068ba8f0bc0c0c85c194719a394 (patch) | |
tree | 36cc0f6be3205474a3e57a67f87471f7aa18c64e | |
parent | 4cfdba9223fe75ac6eb259d403c6f21a36e60679 (diff) | |
download | pentadactyl-fc410045b445c068ba8f0bc0c0c85c194719a394.tar.gz |
Fix 'activate'.
-rw-r--r-- | common/modules/base.jsm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 228c7518..f39f17bf 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -911,6 +911,7 @@ Class.prototype = { * localized properties. */ update: function update() { + let self = this; // XXX: Duplication. for (let i = 0; i < arguments.length; i++) { @@ -922,15 +923,15 @@ Class.prototype = { if (typeof desc.value === "function") { let func = desc.value.wrapped || desc.value; - func.__defineGetter__("super", function () Object.getPrototypeOf(this)[k]); + func.__defineGetter__("super", function () Object.getPrototypeOf(self)[k]); func.superapply = function superapply(self, args) - let (meth = Object.getPrototypeOf(this)[k]) + let (meth = Object.getPrototypeOf(self)[k]) meth && meth.apply(self, args); func.supercall = function supercall(self) func.superapply(self, Array.slice(arguments, 1)); } try { - if ("value" in desc && set.has(this.localizedProperties, k)) + if ("value" in desc && i in this.localizedProperties) this[k] = desc.value; else Object.defineProperty(this, k, desc); |