blob: 684781fc358f3ca6de50ccc48f314ff2184c43ea [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test(object)
{
return "$1" in object;
}
noInline(test);
var target1 = RegExp;
var target2 = { __proto__: RegExp };
for (var i = 0; i < 1e5; ++i) {
shouldBe(test(target1), true);
shouldBe(test(target2), true);
}