summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1135718.js
blob: 312c2ce35df2252894b3f0fa8a01dca85e2c75be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

setJitCompilerOption("ion.warmup.trigger", 30);
function ArrayCallback(state)
  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__ = {};