js/src/tests/ecma_5/Function/Function-arguments-gc.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 // |reftest| skip-if(Android)
     2 /*
     3  * Any copyright is dedicated to the Public Domain.
     4  * http://creativecommons.org/licenses/publicdomain/
     5  * Contributor:
     6  *   Christian Holler <decoder@own-hero.net>
     7  */
     9 //-----------------------------------------------------------------------------
    10 var BUGNUMBER = 623301;
    11 var summary = "Properly root argument names during Function()";
    12 print(BUGNUMBER + ": " + summary);
    14 /**************
    15  * BEGIN TEST *
    16  **************/
    18 if (typeof gczeal === "function")
    19   gczeal(2);
    21 function crashMe(n)
    22 {
    23   var nasty = [];
    24   while (n--)
    25     nasty.push("a" + n);
    26   return Function.apply(null, nasty);
    27 }
    29 var count = 64; // exact value not important
    30 assertEq(crashMe(count + 1).length, count);
    32 if (typeof gczeal === "function")
    33     gczeal(0); // reset
    35 /******************************************************************************/
    37 if (typeof reportCompare === "function")
    38   reportCompare(true, true);
    40 print("All tests passed!");

mercurial