Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | var g = newGlobal(); |
michael@0 | 2 | var dbg = new Debugger; |
michael@0 | 3 | var gw = dbg.addDebuggee(g); |
michael@0 | 4 | var log; |
michael@0 | 5 | var a = []; |
michael@0 | 6 | |
michael@0 | 7 | dbg.onDebuggerStatement = function (frame) { |
michael@0 | 8 | log += 'd'; |
michael@0 | 9 | frame.onStep = function () { |
michael@0 | 10 | // This handler must not wipe out the debuggee's value in JSContext::iterValue. |
michael@0 | 11 | log += 's'; |
michael@0 | 12 | // This will use JSContext::iterValue in the debugger. |
michael@0 | 13 | for (let i of a) |
michael@0 | 14 | log += 'i'; |
michael@0 | 15 | }; |
michael@0 | 16 | }; |
michael@0 | 17 | |
michael@0 | 18 | log = ''; |
michael@0 | 19 | g.eval("debugger; for (let i of [1,2,3]) print(i);"); |
michael@0 | 20 | assertEq(!!log.match(/^ds*$/), true); |