diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/bug686396.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/bug686396.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,16 @@ + +(function () { + assertEquals = function assertEquals(expected, found, name_opt) { }; +})(); +function testOne(receiver, key, result) { + for(var i = 0; i != 10; i++ ) { + assertEquals(result, receiver[key]()); + } +} +function TypeOfThis() { return typeof this; } +Number.prototype.type = TypeOfThis; +String.prototype.type = TypeOfThis; +Boolean.prototype.type = TypeOfThis; +testOne(2.3, 'type', 'object'); +testOne('x', 'type', 'object'); +testOne(true, 'type', 'object');