js/src/tests/js1_8_1/jit/regress-462459-02.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 var BUGNUMBER = 462459;
     8 var summary = 'TM: trace Array(1)';
     9 var actual = '';
    10 var expect = '';
    12 printBugNumber(BUGNUMBER);
    13 printStatus (summary);
    15 jit(true);
    17 if (!this.tracemonkey || this.tracemonkey.adaptive)
    18 {
    19   jit(false);
    20   expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
    21   reportCompare(expect, actual, summary);
    22 }
    23 else
    24 {
    25   jit(true);
    27   expect = 'recorder started, recorder not aborted, trace completed';
    28   actual = '';
    30   var recorderStartedStart = this.tracemonkey.recorderStarted;
    31   var recorderAbortedStart = this.tracemonkey.recorderAborted;
    32   var traceCompletedStart  = this.tracemonkey.traceCompleted;
    34   for (var i = 0; i < RUNLOOP; i++)
    35   {
    36     Array(1);
    37   }
    39   jit(false);
    41   var recorderStartedEnd = this.tracemonkey.recorderStarted;
    42   var recorderAbortedEnd = this.tracemonkey.recorderAborted;
    43   var traceCompletedEnd  = this.tracemonkey.traceCompleted;
    45   if (recorderStartedEnd > recorderStartedStart)
    46   {
    47     actual = 'recorder started, ';
    48   }
    49   else
    50   {
    51     actual = 'recorder not started, ';
    52   }
    54   if (recorderAbortedEnd > recorderAbortedStart)
    55   {
    56     actual += 'recorder aborted, ';
    57   }
    58   else
    59   {
    60     actual += 'recorder not aborted, ';
    61   }
    63   if (traceCompletedEnd > traceCompletedStart)
    64   {
    65     actual += 'trace completed';
    66   }
    67   else
    68   {
    69     actual += 'trace not completed';
    70   }
    72   reportCompare(expect, actual, summary);
    73 }

mercurial