mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 860887 - Having Array.prototype.remove and calling pushPermissions causes exception. r=ted
This commit is contained in:
parent
559e7d3de8
commit
d6fea41b48
@ -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() {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user