summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1766656.js
blob: 7096f6b274204a97363396d4df608733382aef39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |jit-test| error: Error

const thisGlobal = this;
const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal});
const globals = [thisGlobal, otherGlobalSameCompartment, undefined];
function testProperties(global, count) {
  let {object: source, transplant} = transplantableObject();
  for (let i9 = 0; i9 < count; i9++) {
    source[(0) + i9] = i9;
  }
  transplant(global);
}
for (let global of globals) {
  for (let count of [0, 10, 30]) {
    testProperties(global, count);
  }
}