[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / in-by-id-custom-accessors.js
1 function shouldBe(actual, expected) {
2     if (actual !== expected)
3         throw new Error('bad value: ' + actual);
4 }
5
6 function test1(object)
7 {
8     return "customValue" in object;
9 }
10 noInline(test1);
11
12 function test2(object)
13 {
14     return "customAccessor" in object;
15 }
16 noInline(test2);
17
18 var target1 = $vm.createCustomTestGetterSetter();
19 var target2 = { __proto__: target1 };
20 for (var i = 0; i < 1e5; ++i) {
21     shouldBe(test1(target1), true);
22     shouldBe(test1(target2), true);
23     shouldBe(test2(target1), true);
24     shouldBe(test2(target2), true);
25 }