]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/op-push-name-scope-crashes-profiler.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / op-push-name-scope-crashes-profiler.js
CommitLineData
ed1e77d3
A
1//@ runProfiler
2function test() {
3 (function functionName() {
4 ++counter;
5 if (!arguments[0])
6 return;
7 eval("functionName(arguments[0] - 1, functionName, '' + functionName);");
8 })(arguments[0]);
9}
10
11for (var i = 0; i < 10000; ++i) {
12 counter = 0;
13 test(100);
14 if (counter !== 101) {
15 throw "Oops, test(100) = " + test(100) + ", expected 101.";
16 }
17}