Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 // onPop handlers fire even on frames that make tail calls.
2 var g = newGlobal();
3 var dbg = new Debugger(g);
4 var log;
6 g.eval('function f(n) { if (n > 0) f(n-1); else debugger; }');
8 dbg.onEnterFrame = function handleEnter(frame) {
9 log += '(';
10 frame.onPop = function handlePop(c) {
11 log += ')';
12 assertEq(typeof c == "object" && 'return' in c, true);
13 };
14 };
16 log = '';
17 g.f(10);
18 assertEq(log, "((((((((((()))))))))))");