]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/activation-test-loop.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / activation-test-loop.js
1 function Inner() {
2 this.i = 0;
3 this.doStuff = function() {
4 this.i++;
5 if (this.i > 10000)
6 this.isDone();
7 }
8 }
9
10 var foo = function() {
11 var inner = new Inner();
12 var done = false;
13 inner.isDone = function() {
14 done = true;
15 }
16
17 while (true) {
18 var val = inner.doStuff();
19 if (done)
20 break;
21 }
22 }
23
24 foo();