js/src/jit-test/tests/baseline/bug848743-1.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 function A() {};
     2 A.prototype = [];
     4 function B() {};
     5 B.prototype = new A();
     7 function C() {};
     8 C.prototype = new B();
    10 function D() {};
    11 D.prototype = new C();
    13 function E() {};
    14 E.prototype = new D();
    16 function f() {
    17     var o = new B();
    18     for (var i=0; i<10; i++)
    19 	o[i] = i;
    21     var expected = '{"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9}';
    22     assertEq(JSON.stringify(o), expected);
    24     var o = new A();
    25     for (var i=0; i<10; i++)
    26 	o[i] = i;
    28     assertEq(JSON.stringify(o), expected);
    30     var o = new D();
    31     for (var i=0; i<10; i++)
    32 	o[i] = i;
    34     assertEq(JSON.stringify(o), expected);
    36     var o = new E();
    37     for (var i=0; i<10; i++)
    38 	o[i] = i;
    40     assertEq(JSON.stringify(o), expected);
    41 }
    42 f();

mercurial