summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1135718.js
blob: 515457cdfb16cfbe3e40078d8cf2734bdf3cb501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
setJitCompilerOption("ion.warmup.trigger", 30);
function ArrayCallback(state) {
  return this.state = state;
}
ArrayCallback.prototype.isUpperCase = function(v, index, array) {
    return this.state ? true : (v == v.toUpperCase());
};
strings = ['hello', 'Array', 'WORLD'];
obj = new ArrayCallback(false);
strings.filter(obj.isUpperCase, obj)
obj = new ArrayCallback(true);
strings.filter(obj.isUpperCase, obj)
obj.__proto__ = {};