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 // Debugger.Frame preserves Ion frame identity
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_Ion2NoParallelCompilation))
6 quit();
8 withJitOptions(Opts_Ion2NoParallelCompilation, function () {
9 var g = newGlobal();
10 var dbg1 = new Debugger;
11 var dbg2 = new Debugger;
13 g.toggle = function toggle(x, d) {
14 if (d) {
15 dbg1.addDebuggee(g);
16 dbg2.addDebuggee(g);
17 var frame1 = dbg1.getNewestFrame();
18 assertEq(frame1.environment.getVariable("x"), x);
19 assertEq(frame1.implementation, "ion");
20 frame1.environment.setVariable("x", "not 42");
21 assertEq(dbg2.getNewestFrame().environment.getVariable("x"), "not 42");
22 }
23 };
25 g.eval("" + function f(x, d) { toggle(x, d); });
27 g.eval("(" + function test() {
28 for (var i = 0; i < 5; i++)
29 f(42, false);
30 f(42, true);
31 } + ")();");
32 });