js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +// evalWithBindings code can assign to the bindings.
     1.5 +var g = newGlobal();
     1.6 +var dbg = new Debugger(g);
     1.7 +var hits = 0;
     1.8 +dbg.onDebuggerStatement = function (frame) {
     1.9 +    assertEq(frame.evalWithBindings("for (i = 0; i < 5; i++) {}  i;", {i: 10}).return, 5);
    1.10 +    hits++;
    1.11 +};
    1.12 +
    1.13 +g.eval("debugger;");
    1.14 +assertEq("i" in g, false);
    1.15 +assertEq(hits, 1);

mercurial