js/src/tests/js1_7/extensions/regress-458679.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(!xulRuntime.shell||xulRuntime.shell&&xulRuntime.XPCOMABI.match(/x86_64/)) slow
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 //-----------------------------------------------------------------------------
     8 var BUGNUMBER = 458679;
     9 var summary = 'Do not assert: nbytes != 0';
    10 var actual = '';
    11 var expect = '';
    13 printBugNumber(BUGNUMBER);
    14 printStatus (summary);
    16 function f()
    17 {
    18   for (var i = 1; i < dps.length; ++i) {
    19     var a = "";
    20     var b = "";
    21     var c = "";
    22   }
    23 }
    25 function stringOfLength(n)
    26 {
    27   if (n == 0) {
    28     return "";
    29   } else if (n == 1) {
    30     return "\"";
    31   } else {
    32     var r = n % 2;
    33     var d = (n - r) / 2;
    34     var y = stringOfLength(d);
    35     return y + y + stringOfLength(r);
    36   }    
    37 }
    39 try
    40 {
    41   this.__defineGetter__('x', this.toSource);
    42   while (x.length < 12000000) { 
    43     let q = x;
    44     s = q + q; 
    45   }
    46   print(x.length);
    47 }
    48 catch(ex)
    49 {
    50 }
    52 reportCompare(expect, actual, summary);

mercurial