js/src/jit-test/tests/basic/bug627692-2.js

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

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 N = 0;
     2 function n() {}
     3 s = n;
     4 function f(foo) {
     5     gc();
     6     try {
     7         (Function(foo))();
     8     } catch(r) {}
     9     delete this.Math;
    10 }
    11 function g() {}
    12 var c;
    13 function y() {}
    14 t = b = eval;
    15 f("\
    16   __defineGetter__(\"\",\
    17     function(p){\
    18       for(var s in this) {}\
    19     }\
    20   )[\"\"]\
    21 ");
    22 f("\
    23   do;\
    24   while(([\
    25     \"\" for each(z in this)\
    26   ])&0)\
    27 ");
    28 f();

mercurial