1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/basic/testArrayInWithIndexedProto.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +function testArrayInWithIndexedProto() 1.5 +{ 1.6 + Array.prototype[0] = "Got me"; 1.7 + var zeroPresent, zeroPresent2; 1.8 + // Need to go to 18 because in the failure mode this is 1.9 + // testing we have various side-exits in there due to interp and 1.10 + // tracer not agreeing that confuse the issue and cause us to not 1.11 + // hit the bad case within 9 iterations. 1.12 + for (var j = 0; j < 18; ++j) { 1.13 + zeroPresent = 0 in []; 1.14 + } 1.15 + 1.16 + var arr = [1, 2]; 1.17 + delete arr[0]; 1.18 + for (var j = 0; j < 18; ++j) { 1.19 + zeroPresent2 = 0 in arr; 1.20 + } 1.21 + return [zeroPresent, zeroPresent2]; 1.22 +} 1.23 + 1.24 +var [ret, ret2] = testArrayInWithIndexedProto(); 1.25 +assertEq(ret, true); 1.26 +assertEq(ret2, true); 1.27 +