js/src/jit-test/tests/jaeger/bug769985.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.

     2 /* Make sure ints are converted to doubles as needed at the head of loops which modify those ints. */
     4 function bar() {}
     6 function foo() {
     7   var n = 0.5;
     8   n -= 0.5;
     9   var iters = 0;
    10   for (var i = n;; ) {
    11     bar();
    12     iters++;
    13     if (i == 100)
    14       break;
    15     i = (i + 1) | 0;
    16   }
    17   assertEq(iters, 101);
    18 }
    19 foo();

mercurial