Created
March 27, 2019 21:32
-
-
Save jimblandy/f63d37e0bfb4a2a512d904226cfe7459 to your computer and use it in GitHub Desktop.
This should print two completions before 'callback', right???
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g = newGlobal({newCompartment: true}); | |
g.eval(` | |
async function f() { | |
debugger; | |
await Promise.resolve(3); | |
return "ok"; | |
} | |
`); | |
let dbg = Debugger(g); | |
dbg.onDebuggerStatement = frame => { | |
frame.onPop = completion => { | |
print(`completion: ${uneval(completion)}`); | |
}; | |
}; | |
g.dis(g.f); | |
g.f().then(value => { print(`callback`); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment