diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/ion/bug825705.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/ion/bug825705.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,23 @@ +// Test 1: When constructing x, we shouldn't take the prototype for this. +// it will crash if that happens +evalcx("\ + var x = newGlobal().Object;\ + function f() { return new x; }\ + f();\ + f();\ +", newGlobal()); + +// Test 2: Don't take the prototype of proxy's to create |this|, +// as this will throw... Not expected behaviour. +var O = new Proxy(function() {}, { + get: function() { + throw "get trap"; + } +}); + +function f() { + new O(); +} + +f(); +f();