summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1655917.js
blob: 5805958ed7ea3437787724c438bf1e0a232c8ac1 (plain)
1
2
3
4
5
6
7
8
9
10
var g = newGlobal({ newCompartment: true });
g.eval(`
  var obj = {};
  var ref = new WeakRef(obj);
  Promise.resolve().then(() => {
    assertEq(ref.deref(), obj);
  });
`);
nukeCCW(g.ref);
drainJobQueue();