michael@0: function testArrayInWithIndexedProto() michael@0: { michael@0: Array.prototype[0] = "Got me"; michael@0: var zeroPresent, zeroPresent2; michael@0: // Need to go to 18 because in the failure mode this is michael@0: // testing we have various side-exits in there due to interp and michael@0: // tracer not agreeing that confuse the issue and cause us to not michael@0: // hit the bad case within 9 iterations. michael@0: for (var j = 0; j < 18; ++j) { michael@0: zeroPresent = 0 in []; michael@0: } michael@0: michael@0: var arr = [1, 2]; michael@0: delete arr[0]; michael@0: for (var j = 0; j < 18; ++j) { michael@0: zeroPresent2 = 0 in arr; michael@0: } michael@0: return [zeroPresent, zeroPresent2]; michael@0: } michael@0: michael@0: var [ret, ret2] = testArrayInWithIndexedProto(); michael@0: assertEq(ret, true); michael@0: assertEq(ret2, true); michael@0: