mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-25 03:23:32 +01:00
Fix absurd error on FF36.
This commit is contained in:
@@ -634,7 +634,8 @@ function update(target) {
|
|||||||
let desc = Object.getOwnPropertyDescriptor(src, k);
|
let desc = Object.getOwnPropertyDescriptor(src, k);
|
||||||
if (desc.value instanceof Class.Property)
|
if (desc.value instanceof Class.Property)
|
||||||
desc = desc.value.init(k, target) || desc.value;
|
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;
|
let func = desc.value.wrapped || desc.value;
|
||||||
func.__defineGetter__("super", function () Object.getPrototypeOf(target)[k]);
|
func.__defineGetter__("super", function () Object.getPrototypeOf(target)[k]);
|
||||||
func.superapply = function superapply(self, args)
|
func.superapply = function superapply(self, args)
|
||||||
|
|||||||
@@ -228,9 +228,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
case "string":
|
case "string":
|
||||||
assertType(Ci.nsIPrefBranch.PREF_STRING);
|
assertType(Ci.nsIPrefBranch.PREF_STRING);
|
||||||
|
|
||||||
let supportString = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
this.branch.setComplexValue(name, Ci.nsISupportsString, services.String(value));
|
||||||
supportString.data = value;
|
|
||||||
this.branch.setComplexValue(name, Ci.nsISupportsString, supportString);
|
|
||||||
break;
|
break;
|
||||||
case "number":
|
case "number":
|
||||||
assertType(Ci.nsIPrefBranch.PREF_INT);
|
assertType(Ci.nsIPrefBranch.PREF_INT);
|
||||||
|
|||||||
Reference in New Issue
Block a user