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 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 */
5 load(libdir + 'array-compare.js');
7 var obj = {};
9 /********************
10 * STRICT ARGUMENTS *
11 ********************/
13 function strictNestedAssignShadowVar(p)
14 {
15 "use strict";
16 function inner()
17 {
18 var p = 12;
19 function innermost() { p = 1776; return 12; }
20 return innermost();
21 }
22 return arguments;
23 }
25 assertEq(arraysEqual(strictNestedAssignShadowVar(), []), true);
26 assertEq(arraysEqual(strictNestedAssignShadowVar(99), [99]), true);
27 assertEq(arraysEqual(strictNestedAssignShadowVar(""), [""]), true);
28 assertEq(arraysEqual(strictNestedAssignShadowVar(obj), [obj]), true);