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 // Ion can bail in-place when throwing exceptions with debug mode toggled on.
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_Ion2NoParallelCompilation))
6 quit();
8 withJitOptions(Opts_Ion2NoParallelCompilation, function () {
9 var g = newGlobal();
10 var dbg = new Debugger;
12 g.toggle = function toggle(x, d) {
13 if (d) {
14 dbg.addDebuggee(g);
15 var frame = dbg.getNewestFrame().older;
16 assertEq(frame.callee.name, "f");
17 assertEq(frame.implementation, "ion");
18 throw 42;
19 }
20 };
22 g.eval("" + function f(x, d) { g(x, d); });
23 g.eval("" + function g(x, d) { toggle(x, d); });
25 try {
26 g.eval("(" + function test() {
27 for (var i = 0; i < 5; i++)
28 f(42, false);
29 f(42, true);
30 } + ")();");
31 } catch (exc) {
32 assertEq(exc, 42);
33 }
34 });