blob: ed67774f794665088669e3159e293ede591361a3 (
plain)
1
2
3
4
5
6
7
8
9
|
// Environment.prototype.setVariable can set global variables.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (frame) {
frame.environment.parent.setVariable("x", 2);
};
g.eval("var x = 1; debugger;");
assertEq(g.x, 2);
|