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 // The value returned by getVariable can be a Debugger.Object.
3 var g = newGlobal();
4 var dbg = new Debugger;
5 var gw = dbg.addDebuggee(g);
6 var hits = 0;
7 dbg.onDebuggerStatement = function (frame) {
8 var a = frame.environment.getVariable('Math');
9 assertEq(a instanceof Debugger.Object, true);
10 var b = gw.getOwnPropertyDescriptor('Math').value;
11 assertEq(a, b);
12 hits++;
13 };
14 g.eval("debugger;");
15 assertEq(hits, 1);