1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/bug945294.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +// |jit-test| error:is not a function 1.5 +var arr = []; 1.6 + 1.7 +var C = function () {}; 1.8 +C.prototype.dump = function () {}; 1.9 +arr[0] = new C; 1.10 + 1.11 +C = function () {}; 1.12 +C.prototype.dump = this; 1.13 +arr[1] = new C; 1.14 + 1.15 +function f() { 1.16 + for (var i = 0; i < arr.length; i++) 1.17 + arr[i].dump(); 1.18 +} 1.19 + 1.20 +try { 1.21 + f(); 1.22 +} catch (exc) { 1.23 + assertEq(exc.message.contains("is not a function"), true); 1.24 +} 1.25 +f();