js/src/jit-test/tests/asm.js/testBug863867.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 assertEq((function() {
     2   'use asm';
     3   function _main() {
     4     var $1=0, $2=0, $3=0, $4=0, $5=0, $6=0, $7=0, $8=0, $9=0, $10=0, label=0;
     5     label = 1;
     6     while (1) {
     7       switch (label | 0) {
     8        case 1:
     9         $2 = $1 + 14 | 0;
    10         $3 = $1;
    11         label = 20;
    12         break;
    13        case 20:
    14         $5 = $2;
    15         $4 = $3;
    16         label = 24;
    17         break;
    18        case 24:
    19         $7 = $5 + 1 | 0;
    20         $8 = $4 + 1 | 0;
    21         return $8|0;
    22        case 49:
    23         $9 = $6 + 1 | 0;
    24         if ($10) {
    25           $6 = $9;
    26           break;
    27         }
    28         return 0;
    29       }
    30     }
    31     return 0;
    32   }
    33   return _main;
    34 })()(), 1);

mercurial