diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-03-03 00:18:19 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-03-03 00:18:19 -0500 |
commit | 50da587af826df1a60f3d1564970e585cc9791ae (patch) | |
tree | e7b5c460fd47ea88ed9fbd32c6c588ec7e1dabb8 | |
parent | 66785a8b5f3e46212d803217dd23c7ece749fa80 (diff) | |
download | pentadactyl-50da587af826df1a60f3d1564970e585cc9791ae.tar.gz |
Fix absurd error on FF36.
-rw-r--r-- | common/modules/base.jsm | 3 | ||||
-rw-r--r-- | common/modules/prefs.jsm | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/common/modules/base.jsm b/common/modules/base.jsm index e00211ad..3bb93783 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -634,7 +634,8 @@ function update(target) { let desc = Object.getOwnPropertyDescriptor(src, k); if (desc.value instanceof Class.Property) desc = desc.value.init(k, target) || desc.value; - if (typeof desc.value == "function" && Object.getPrototypeOf(target)) { + + if (typeof desc.value === "function" && target.__proto__) { let func = desc.value.wrapped || desc.value; func.__defineGetter__("super", function () Object.getPrototypeOf(target)[k]); func.superapply = function superapply(self, args) diff --git a/common/modules/prefs.jsm b/common/modules/prefs.jsm index c287dab8..38c26ed0 100644 --- a/common/modules/prefs.jsm +++ b/common/modules/prefs.jsm @@ -228,9 +228,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]) case "string": assertType(Ci.nsIPrefBranch.PREF_STRING); - let supportString = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); - supportString.data = value; - this.branch.setComplexValue(name, Ci.nsISupportsString, supportString); + this.branch.setComplexValue(name, Ci.nsISupportsString, services.String(value)); break; case "number": assertType(Ci.nsIPrefBranch.PREF_INT); |