1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/collections/Set-gc-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +// Check marking through the elements of a Set. 1.5 + 1.6 +load(libdir + "referencesVia.js"); 1.7 + 1.8 +var s = new Set; 1.9 +for (var i = 0; i < 20; i++) { 1.10 + var t = new Set; 1.11 + t.add(s); 1.12 + assertEq(referencesVia(t, 'key', s), true); 1.13 + s = t; 1.14 +} 1.15 + 1.16 +gc(); 1.17 +gc(); 1.18 + 1.19 +// TODO: walk the chain and make sure it's still intact