diff options
Diffstat (limited to 'js/src/jit-test/tests/collections/Map-Set-moving-gc.js')
-rw-r--r-- | js/src/jit-test/tests/collections/Map-Set-moving-gc.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/collections/Map-Set-moving-gc.js b/js/src/jit-test/tests/collections/Map-Set-moving-gc.js new file mode 100644 index 000000000..e603756dc --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-Set-moving-gc.js @@ -0,0 +1,16 @@ +var m = new Map; +var s = new Set; + +var A = []; +for (var i = 0; i < 1024; ++i) { + var key = {i:i}; + m.set(key, i); + s.add(key); + A.push(key); +} +gc(); +for (var i in A) { + var key = A[i]; + assertEq(m.has(key), true); + assertEq(s.has(key), true); +} |