blob: d74e9f2b9ebea0e1f8bfbb333190e9794b3fed16 (
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();
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);
|