1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/jaeger/bug732423.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,23 @@ 1.4 +function testStuff(x, y) { 1.5 + for (var i = 0; i < 60; i++) { 1.6 + x[y](); 1.7 + x[y]; 1.8 + } 1.9 +} 1.10 +testStuff({"elements":function(){}}, "elements"); 1.11 + 1.12 +var o = { 1.13 + res: 0, 1.14 + f: function() { this.res += 3; }, 1.15 + __noSuchMethod__: function() { this.res += 5; } 1.16 +}; 1.17 + 1.18 +function testNoSuchMethod(x, y) { 1.19 + for (var i = 0; i < 60; i++) { 1.20 + x[y](); 1.21 + } 1.22 +} 1.23 + 1.24 +testNoSuchMethod(o, "f"); 1.25 +testNoSuchMethod(o, "g"); 1.26 +assertEq(o.res, 480);