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 function f1(b) {
2 var w = 3;
3 if (b)
4 function w() {}
5 return w;
6 }
7 assertEq(typeof f1(true), "function");
8 assertEq(f1(false), 3);
10 function f2(b, w) {
11 if (b)
12 function w() {}
13 return w;
14 }
15 assertEq(typeof f2(true, 3), "function");
16 assertEq(f2(false, 3), 3);
18 function f3(b) {
19 let (w = 3) {
20 if (b)
21 function w() {}
22 return w;
23 }
24 }
25 assertEq(f3(true, 3), 3);
26 assertEq(f3(false), 3);