1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-06 18:15:52 +01:00

Fix absurd error on FF36.

This commit is contained in:
Kris Maglione
2011-03-03 00:18:19 -05:00
parent 66785a8b5f
commit 50da587af8
2 changed files with 3 additions and 4 deletions

View File

@@ -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)

View File

@@ -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);