Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 // Binary: cache/js-dbg-64-48e43edc8834-linux
2 // Flags:
3 //
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);