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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // |jit-test| error:is not a function
     2 var arr = [];
     4 var C = function () {};
     5 C.prototype.dump = function () {};
     6 arr[0] = new C;
     8 C = function () {};
     9 C.prototype.dump = this;
    10 arr[1] = new C;
    12 function f() {
    13     for (var i = 0; i < arr.length; i++)
    14         arr[i].dump();
    15 }
    17 try {
    18     f();
    19 } catch (exc) {
    20     assertEq(exc.message.contains("is not a function"), true);
    21 }
    22 f();

mercurial