bug1684821.js (457B)
1 let g = newGlobal({newCompartment: true}); 2 let d = new Debugger(g); 3 4 d.onDebuggerStatement = function (frame) { 5 frame.environment; 6 }; 7 8 g.evaluate(` 9 function * foo() { 10 // Force CallObject + LexicalEnvironmentObject 11 let x; 12 let y = () => x; 13 14 // Force DebuggerEnvironment 15 debugger; 16 17 // Force suspend and frame snapshot 18 yield; 19 20 // Popping this frame will trigger a second snapshot 21 } 22 `) 23 24 let x = g.foo(); 25 x.next(); 26 x.next();