]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/weird-setter-counter.js
1 function foo(o
, value
) {
10 function test(o
, value
, expectedCount
) {
11 var result
= foo(o
, value
);
13 throw new Error("Bad result: " + result
);
14 if (counter
!= expectedCount
)
15 throw new Error("Bad counter value: " + counter
);
18 for (var i
= 0; i
< 100000; ++i
) {
20 o
.__defineSetter__("f", function(value
) {
24 o
.__defineGetter__("f", function() { return this._f
; });
25 test(o
, i
, counter
+ 1);