-1:000000000000 | 0:d9c98698052b |
---|---|
1 // Test 1: When constructing x, we shouldn't take the prototype for this. | |
2 // it will crash if that happens | |
3 evalcx("\ | |
4 var x = newGlobal().Object;\ | |
5 function f() { return new x; }\ | |
6 f();\ | |
7 f();\ | |
8 ", newGlobal()); | |
9 | |
10 // Test 2: Don't take the prototype of proxy's to create |this|, | |
11 // as this will throw... Not expected behaviour. | |
12 var O = new Proxy(function() {}, { | |
13 get: function() { | |
14 throw "get trap"; | |
15 } | |
16 }); | |
17 | |
18 function f() { | |
19 new O(); | |
20 } | |
21 | |
22 f(); | |
23 f(); |