js/src/jit-test/tests/ion/bug980860.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 if (typeof TypedObject === 'undefined')
     2     quit();
     4 var StructType = TypedObject.StructType;
     5 var uint8 = TypedObject.uint8;
     7 function check(c) {
     8   assertEq(c.r, 129);
     9 }
    11 function run() {
    12   var RgbColor = new StructType({r: uint8, g: uint8, b: uint8});
    13   var Fade = new StructType({from: RgbColor, to: RgbColor});
    15   var BrgColor = new StructType({b: uint8, r: uint8, g: uint8});
    16   var BrgFade = new StructType({from: BrgColor, to: BrgColor});
    18   var gray = new RgbColor({r: 129, g: 128, b: 127});
    20   var fade = new Fade({from: gray, to: gray});
    21   fade.to = {r: 129, g: 128, b: 127};
    23   var brgGray = new BrgColor(gray);
    24   fade.from = brgGray;
    26   var brgFade = new BrgFade(fade);
    28   check(fade.to);
    29   check(brgFade.to);
    30   check(fade.to);
    31   check(brgFade.to);
    32 }
    34 run();

mercurial