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 // Creating a global within an onNewGlobalObject handler causes a recursive handler invocation.
2 //
3 // This isn't really desirable behavior, as presumably a global created while a
4 // handler is running is one the debugger is creating for its own purposes and
5 // should not be observed, but if this behavior changes, we sure want to know.
7 var dbg = new Debugger;
8 var log;
9 var depth;
11 dbg.onNewGlobalObject = function (global) {
12 log += '('; depth++;
14 assertEq(global.seen, undefined);
15 global.seen = true;
17 if (depth < 3)
18 newGlobal();
20 log += ')'; depth--;
21 };
23 log = '';
24 depth = 0;
25 newGlobal();
26 assertEq(log, '((()))');