michael@0: // |jit-test| error: 4 michael@0: function g(o) { michael@0: if (o.x >= 0) { michael@0: for(;;) michael@0: o.next(); michael@0: } michael@0: return o.x; michael@0: } michael@0: function f() { michael@0: var o = {x: 0, next: function() { michael@0: if (this.x++ > 100) michael@0: throw 4; michael@0: }}; michael@0: g(o); michael@0: } michael@0: f();