blob: bf22640058bd0a311bae868e3ea4ae6eaa01538e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
var evalInFrame = (function (global) {
var dbgGlobal = newGlobal({newCompartment: true});
var dbg = new dbgGlobal.Debugger();
return function evalInFrame(upCount, code) {
dbg.addDebuggee(global);
var frame = dbg.getNewestFrame().older;
var completion = frame.eval(code);
};
})(this);
var x = 5;
{
let x = eval("this.x++");
evalInFrame(0, ("for (var x = 0; x < 3; ++x) { (function(){})() } "))
}
|