michael@0: // Check marking through the elements of a Set. michael@0: michael@0: load(libdir + "referencesVia.js"); michael@0: michael@0: var s = new Set; michael@0: for (var i = 0; i < 20; i++) { michael@0: var t = new Set; michael@0: t.add(s); michael@0: assertEq(referencesVia(t, 'key', s), true); michael@0: s = t; michael@0: } michael@0: michael@0: gc(); michael@0: gc(); michael@0: michael@0: // TODO: walk the chain and make sure it's still intact