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 // Setting onPop handlers from an onStep handler works.
2 var g = newGlobal();
3 var dbg = new Debugger(g);
4 var log;
6 dbg.onDebuggerStatement = function handleDebugger(frame) {
7 log += 'd';
8 assertEq(frame.type, "eval");
9 frame.onStep = function handleStep() {
10 log += 's';
11 this.onStep = undefined;
12 this.onPop = function handlePop() {
13 log += ')';
14 };
15 };
16 };
18 log = "";
19 g.flag = false;
20 g.eval('debugger; flag = true');
21 assertEq(log, 'ds)');
22 assertEq(g.flag, true);