summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/realms/bug1514263.js
blob: 066663c43449af80957cfc5754b82962ae43ab18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function O(x) {
    this.x = x;
}

var arr = [];
for (var i = 0; i < 100; i++) {
    arr.push(new O(i));
}

var g = newGlobal({sameCompartmentAs: this});
g.trigger = function(arr) {
    var obj = arr[90];
    this.Object.create(obj);
    assertEq(objectGlobal(obj), objectGlobal(arr));
};
g.trigger(arr);