summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrays/bug1897150-1.js
blob: d7a26fb41acc93e3ebd787923e44b116fdb7b5a9 (plain)
1
2
3
4
5
6
7
8
9
var arr = [1,2,3,4]
var global = 1;

var comparator = function(a, b) {
  assertEq(this.global, 1);
  return b - a;
}

arr.sort(comparator);