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 // obj.environment is undefined when the referent is not a JS function.
3 var g = newGlobal()
4 var dbg = new Debugger;
5 var gw = dbg.addDebuggee(g);
6 assertEq(gw.environment, undefined);
8 g.eval("var r = /x/;");
9 var rw = gw.getOwnPropertyDescriptor("r").value;
10 assertEq(rw.class, "RegExp");
11 assertEq(rw.environment, undefined);
13 // Native function.
14 var fw = gw.getOwnPropertyDescriptor("parseInt").value;
15 assertEq(fw.class, "Function");
16 assertEq(fw.environment, undefined);