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

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:8ecb32d8c306
1 // Binary: cache/js-dbg-64-48e43edc8834-linux
2 // Flags:
3 //
4
5 var g = newGlobal();
6 var dbg = Debugger(g);
7 dbg.onDebuggerStatement = function (frame) {
8 var s = frame.eval("f").return.script;
9 };
10 function test(s) {
11 g.eval("line0 = Error().lineNumber;\n" +
12 "debugger;\n" + // line0 + 1
13 "function f(i) {\n" + // line0 + 2
14 "}\n");
15 }
16 test("i = 128;\n" + "}\n");
17 var hits = 0;
18 dbg.onNewScript = function (s) {
19 hits++;
20 };
21 assertEq(g.eval("eval('2 + 3')"), 5);
22 this.gczeal(hits, 2);
23 var fn = g.evaluate("(function (a) { return 5 + a; })", {compileAndGo: false});
24 var g2 = newGlobal();
25 dbg.addDebuggee(g2, dbg);
26 g2.clone(fn);

mercurial