js/src/jit-test/tests/basic/bug908915.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 // |jit-test| error: 42
     2 function f(y) {}
     3 for each(let e in newGlobal()) {
     4     if (e.name === "quit" || e.name == "readline" || e.name == "terminate" ||
     5 	e.name == "nestedShell")
     6 	continue;
     7     try {
     8         e();
     9     } catch (r) {}
    10 }
    11 (function() {
    12     arguments.__proto__.__proto__ = newGlobal()
    13     function f(y) {
    14         y()
    15     }
    16     for each(b in []) {
    17 	if (b.name === "quit" || b.name == "readline" || b.name == "terminate" ||
    18 	    b.name == "nestedShell")
    19 	    continue;
    20         try {
    21             f(b)
    22         } catch (e) {}
    23     }
    24 })();
    26 throw 42;

mercurial