js/src/jit-test/tests/auto-regress/bug677977.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/auto-regress/bug677977.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +// Binary: cache/js-dbg-64-48e43edc8834-linux
     1.5 +// Flags:
     1.6 +//
     1.7 +
     1.8 +var g = newGlobal();
     1.9 +var dbg = Debugger(g);
    1.10 +dbg.onDebuggerStatement = function (frame) {
    1.11 +    var s = frame.eval("f").return.script;
    1.12 +};
    1.13 +function test(s) {
    1.14 +    g.eval("line0 = Error().lineNumber;\n" +
    1.15 +           "debugger;\n" +          // line0 + 1
    1.16 +           "function f(i) {\n" +    // line0 + 2
    1.17 +           "}\n");
    1.18 +}
    1.19 +test("i = 128;\n" +  "}\n");
    1.20 +var hits = 0;
    1.21 +dbg.onNewScript = function (s) {
    1.22 +    hits++;
    1.23 +};
    1.24 +assertEq(g.eval("eval('2 + 3')"), 5);
    1.25 +this.gczeal(hits, 2);
    1.26 +var fn = g.evaluate("(function (a) { return 5 + a; })", {compileAndGo: false});
    1.27 +var g2 = newGlobal();
    1.28 +dbg.addDebuggee(g2, dbg);
    1.29 +g2.clone(fn);

mercurial