js/src/jit-test/tests/jaeger/testPropCallElem2.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 // vim: set ts=8 sts=4 et sw=4 tw=99:
     3 function testUKeyUObject(a, key1, key2, key3) {
     4     a.a = function () { return this.d; }
     5     a.b = function () { return this.e; }
     6     a.c = function() { return this.f; }
     7     a.d = 20;
     8     a.e = "hi";
     9     a.f = 500;
    10     delete a["b"];
    11     Object.defineProperty(a, "b", { get: function () { return function () { return this.e; } } });
    12     assertEq(a[key1](), 20);
    13     assertEq(a[key2](), "hi");
    14     assertEq(a[key3](), 500);
    15 }
    17 for (var i = 0; i < 5; i++)
    18     testUKeyUObject({}, "a", "b", "c");

mercurial