Fix startup error on Firefox 48

Addresses #980. There are a couple other uses of the old API, but I'm not sure
how they're triggered, and we might be gone from Firefox before this is
relevant.
This commit is contained in:
Dan Stillman 2016-04-29 13:09:37 -04:00
parent ef71d3f729
commit b4ac43fd77

View file

@ -152,15 +152,13 @@ Zotero.Translate.DOMWrapper = new function() {
var _permit = { value: 'rw', writable: false, configurable: false, enumerable: true };
return {
getOwnPropertyDescriptor: function(name) { return _permit; },
getPropertyDescriptor: function(name) { return _permit; },
getOwnPropertyNames: function() { throw Error("Can't enumerate ExposedPropsWaiver"); },
getPropertyNames: function() { throw Error("Can't enumerate ExposedPropsWaiver"); },
ownKeys: function() { throw Error("Can't enumerate ExposedPropsWaiver"); },
enumerate: function() { throw Error("Can't enumerate ExposedPropsWaiver"); },
defineProperty: function(name) { throw Error("Can't define props on ExposedPropsWaiver"); },
delete: function(name) { throw Error("Can't delete props from ExposedPropsWaiver"); }
deleteProperty: function(name) { throw Error("Can't delete props from ExposedPropsWaiver"); }
};
};
ExposedPropsWaiver = Proxy.create(ExposedPropsWaiverHandler());
ExposedPropsWaiver = new Proxy({}, ExposedPropsWaiverHandler());
function SpecialPowersHandler(obj, overrides) {
this.wrappedObject = obj;