michael@0: // Test 1: When constructing x, we shouldn't take the prototype for this. michael@0: // it will crash if that happens michael@0: evalcx("\ michael@0: var x = newGlobal().Object;\ michael@0: function f() { return new x; }\ michael@0: f();\ michael@0: f();\ michael@0: ", newGlobal()); michael@0: michael@0: // Test 2: Don't take the prototype of proxy's to create |this|, michael@0: // as this will throw... Not expected behaviour. michael@0: var O = new Proxy(function() {}, { michael@0: get: function() { michael@0: throw "get trap"; michael@0: } michael@0: }); michael@0: michael@0: function f() { michael@0: new O(); michael@0: } michael@0: michael@0: f(); michael@0: f();