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() {
2 var o = {'arguments': 42};
3 with (o) { // Definitely forces heavyweight.
4 // Note syntax is not a property access.
5 reportCompare(delete arguments, true,
6 "arguments property deletion within with block");
7 }
8 reportCompare('arguments' in o, false,
9 "property deletion observable");
10 })();
12 (function() {
13 var o = {'arguments': 42};
14 delete o.arguments;
15 reportCompare('arguments' in o, false,
16 "arguments property deletion with property access syntax");
17 })();
19 (function() {
20 var arguments = 42; // Forces heavyweight.
21 reportCompare(delete arguments, false,
22 "arguments variable");
23 })();
25 (function() {
26 reportCompare(delete arguments, false, "arguments object");
27 })();