1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/jaeger/bug706110.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,18 @@ 1.4 +function test() { 1.5 + function Bug() { this.prototype } 1.6 + var actual = (new Bug instanceof Bug); 1.7 + assertEq(actual, true); 1.8 +} 1.9 +test(); 1.10 +test(); 1.11 + 1.12 +function testLambdaCtor() { 1.13 + var q; 1.14 + for (var x = 0; x < 2; ++x) { 1.15 + var f = function(){}; 1.16 + if (x == 1) gc(); 1.17 + q = new f; 1.18 + } 1.19 + return q.__proto__ === f.prototype; 1.20 +} 1.21 +assertEq(testLambdaCtor(), true);