michael@0: // Check marking through the keys of a Map. michael@0: michael@0: load(libdir + "referencesVia.js"); michael@0: michael@0: var m = new Map; michael@0: for (var i = 0; i < 20; i++) { michael@0: var n = new Map; michael@0: n.set(m, i); michael@0: assertEq(referencesVia(n, 'key', m), true); michael@0: m = n; michael@0: } michael@0: michael@0: gc(); michael@0: gc(); michael@0: michael@0: // TODO: walk the chain using for-of to make sure everything is still there