michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: var visibleFrames = 0; michael@0: dbg.onEnterFrame = function (frame) { michael@0: print("> " + frame.script.url); michael@0: visibleFrames++; michael@0: } michael@0: michael@0: g.eval("(" + function iife() { michael@0: [1].forEach(function noop() {}); michael@0: for (let x of [1]) {} michael@0: } + ")()"); michael@0: michael@0: // 1 for eval, 1 for iife(), 1 for noop() michael@0: assertEq(visibleFrames, 3);