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