summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1894547.js
blob: 78a3cff036843b825347497e1295570c49afa888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |jit-test| --enable-symbols-as-weakmap-keys; skip-if: getBuildConfiguration("release_or_beta")

gczeal(0);
let wm = new WeakMap();
let s = {};
wm.set(s, new WeakMap());
let ss = {x: Symbol()};
wm.get(s).set(this, ss);
let wm2 = new WeakMap();
wm2.set(ss, "test");
ss = null;

// Collect only this zone and not the zone containing the symbol.
gc({});