]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/for-in-proxy.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / for-in-proxy.js
CommitLineData
ed1e77d3
A
1function foo(o_) {
2 var o = o_;
3 var result = 0;
4 for (var s in o) {
5 result += o[s];
6 }
7 return result;
8}
9
10noInline(foo);
11
12for (var i = 0; i < 10000; ++i) {
13 var result = foo(createProxy({a:1, b:2, c:3, d:4}));
14 if (result != 1 + 2 + 3 + 4)
15 throw "Error: bad result: " + result;
16}