blob: a640834c6487a1ae9fa6caa1c2e7fb08fe8c8118 [file] [log] [blame]
function Inner() {
this.i = 0;
this.doStuff = function() {
this.i++;
if (this.i > 10000)
this.isDone();
}
}
var foo = function() {
var inner = new Inner();
var done = false;
inner.isDone = function() {
done = true;
}
while (true) {
var val = inner.doStuff();
if (done)
break;
}
}
foo();