michael@0: // If one Debugger's onPop handler causes another Debugger to create a michael@0: // Debugger.Frame instance referring to the same frame, that frame still michael@0: // gets marked as not live after all the onPop handlers have run. michael@0: var g = newGlobal(); michael@0: var dbg1 = new Debugger(g); michael@0: var dbg2 = new Debugger(g); michael@0: michael@0: var log; michael@0: var frame2; michael@0: michael@0: dbg1.onEnterFrame = function handleEnter(frame) { michael@0: log += '('; michael@0: frame.onPop = function handlerPop1(c) { michael@0: log += ')'; michael@0: frame2 = dbg2.getNewestFrame(); michael@0: assertEq(frame2.live, true); michael@0: frame2.onPop = function handlePop2(c) { michael@0: assertEq("late frame's onPop handler ran", michael@0: "late frame's onPop handler should not run"); michael@0: }; michael@0: }; michael@0: }; michael@0: michael@0: log = ''; michael@0: assertEq(g.eval('40 + 2'), 42); michael@0: assertEq(log, '()'); michael@0: assertEq(frame2.live, false);