summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1890200.js
blob: caa97fcece6f0440da0069c5d87727e4a5d1b690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
let triggerGC = false;
let proxy = new Proxy({}, {get: function(target, key) {
    if (key === "sameCompartmentAs" || key === "sameZoneAs") {
        triggerGC = true;
        return newGlobal({newCompartment: true});
    }
    if (triggerGC) {
        gc();
        triggerGC = false;
    }
}});
newGlobal(proxy);