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

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

typedArr.sort(comparator);