js/src/tests/js1_5/Regress/regress-131510-001.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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /*
     7  *
     8  * Date:    16 Mar 2002
     9  * SUMMARY: Shouldn't crash if define |var arguments| inside a function
    10  * See http://bugzilla.mozilla.org/show_bug.cgi?id=131510
    11  *
    12  */
    13 //-----------------------------------------------------------------------------
    14 var BUGNUMBER = 131510;
    15 var summary = "Shouldn't crash if define |var arguments| inside a function";
    16 printBugNumber(BUGNUMBER);
    17 printStatus(summary);
    20 function f() {var arguments;}
    21 f();
    24 /*
    25  * Put same example in function scope instead of global scope
    26  */
    27 function g() { function f() {var arguments;}; f();};
    28 g();
    31 /*
    32  * Put these examples in eval scope
    33  */
    34 var s = 'function f() {var arguments;}; f();';
    35 eval(s);
    37 s = 'function g() { function f() {var arguments;}; f();}; g();';
    38 eval(s);
    40 reportCompare('No Crash', 'No Crash', '');

mercurial