js/src/jit-test/tests/gc/bug-880776.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 gczeal(11);
     3 var otherGlobal = newGlobal();
     4 function test(str, arg, result)
     5 {
     6         var fun = new Function('x', str);
     7             var code = "(function (x) { " + str + " })";
     8                 var c = clone(otherGlobal.evaluate(code, {compileAndGo: false}));
     9                     assertEq(c.toSource(), eval(code).toSource());
    10 }
    11 test('return let (y) x;');
    12 test('return let (x) "" + x;', 'unicorns', 'undefined');
    13 test('return let (y = x) (y++, "" + y);', 'unicorns', 'NaN');
    14 test('return let (y = 1) (y = x, y);');
    15 test('return let ([] = x) x;');
    16 test('return let ([, ] = x) x;');
    17 test('return let ([, , , , ] = x) x;');
    18 test('return let ([[]] = x) x;');
    19 test('return let ([[[[[[[[[[[[[]]]]]]]]]]]]] = x) x;');
    20 test('return let ([[], []] = x) x;');
    21 test('return let ([[[[]]], [], , [], [[]]] = x) x;');

mercurial