js/src/jit-test/tests/basic/builtinLocals.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 /* Resolve 'arguments' and the name of the function itself in the presence of such local variables. */
     4 function f() {
     5     return typeof arguments;
     6     function arguments() {
     7         return 7;
     8     }
     9 }
    10 assertEq(f(), "function");
    12 function g() {
    13     var arguments = 0;
    14     return typeof arguments;
    15 }
    16 assertEq(g(), "number");
    18 function h() {
    19     return typeof h;
    20     function h() {
    21         return 7;
    22     }
    23 }
    24 assertEq(h(), "function");
    26 function i() {
    27     return typeof i;
    28     var i;
    29 }
    30 assertEq(i(), "undefined");
    32 function j() {
    33     return typeof j;
    34 }
    35 assertEq(j(), "function");

mercurial