]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/poly-chain-then-getter.js
3 Cons1
.prototype.f
= 42;
7 Cons2
.prototype.__defineGetter__("f", function() {
20 function test(o
, expected
, expectedCount
) {
22 if (result
!= expected
)
23 throw new Error("Bad result: " + result
);
24 if (counter
!= expectedCount
)
25 throw new Error("Bad counter value: " + counter
);
28 for (var i
= 0; i
< 100000; ++i
) {
29 test(new Cons1(), 42, counter
);
30 test(new Cons2(), 84, counter
+ 1);