js/src/jit-test/tests/ion/bug980860.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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