Bug 860887 - Having Array.prototype.remove and calling pushPermissions causes exception. r=ted

This commit is contained in:
Martijn Wargers 2013-05-16 11:26:51 +02:00
parent 559e7d3de8
commit d6fea41b48

View File

@ -5,12 +5,17 @@
var oldVal = false;
// Array Remove - By John Resig (MIT Licensed)
Array.prototype.remove = function(from, to) {
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
};
Object.defineProperty(Array.prototype, "remove", {
enumerable: false,
configurable: false,
writable: false,
value: function(from, to) {
// Array Remove - By John Resig (MIT Licensed)
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
}
});
function devicestorage_setup() {