blob: 280b8a7c493921ee3559bfbea37d80df3b436cbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// frame.environment can be called from the onEnterFrame hook.
var g = newGlobal({newCompartment: true});
g.eval("function f(x) { return 2 * x; }");
var dbg = Debugger(g);
var hits = 0;
dbg.onEnterFrame = function (frame) {
assertEq(frame.environment.names().join(","), "arguments,x");
hits++;
};
assertEq(g.f(22), 44);
assertEq(hits, 1);
|