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

     2 /* Handle recompilation on undefined properties and array holes. */
     4 var v = {};
     5 if (typeof v == 'string')
     6   v.x = 0;
     7 function prop(v)
     8 {
     9   var z = v.x + 1;
    10   assertEq(z, NaN);
    11 }
    12 prop(v);
    14 v = [];
    15 v[0] = 0;
    16 v[1] = 1;
    17 v[3] = 3;
    18 v[4] = 4;
    19 function elem(x)
    20 {
    21   var x = "";
    22   for (var i = 0; i < 5; i++)
    23     x += v[i];
    24   assertEq(x, "01undefined34");
    25 }
    26 elem(v);

mercurial