summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/bug1785200.js
blob: d568f6108d6adcd58b716532878645c2c96409c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const target = {};
const receiver = {};
const id = 5;

let count = 0;
function getter() {
  count++;
  assertEq(this, receiver);
}
Object.defineProperty(target, id, { get: getter });

for (var i = 0; i < 100; i++) {
  Reflect.get(target, id, receiver);
}
assertEq(count, 100);