Bug 1507322 - Test deeply recursive weakmaps. r=jonco, a=RyanVM
authorSteve Fink <sfink@mozilla.com>
Wed, 16 Jan 2019 21:16:48 +0000
changeset 509528 69143a6c191dd9d8742568548fcf7981a0ceb91d
parent 509527 e758e8df7f9a1cd53bc6ca5b670e9c1fa23e6b4c
child 509529 73101717e0676ee8ead22272dc3df324db94b87a
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco, RyanVM
bugs1507322
milestone65.0
Bug 1507322 - Test deeply recursive weakmaps. r=jonco, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D16738
js/src/tests/non262/regress/regress-1507322-deep-weakmap.js
new file mode 100644
--- /dev/null
+++ b/js/src/tests/non262/regress/regress-1507322-deep-weakmap.js
@@ -0,0 +1,11 @@
+function TestGC2(m) {
+  var head = new Object;
+  for (key = head, i = 0; i < 99999; i++, key = m.get(key)) {
+    m.set(key, new Object);
+  }
+  gc();
+  for (key = head; key != undefined; key = m.get(key)) {}
+}
+TestGC2(new WeakMap);
+
+reportCompare(true, true, "deep weakmaps");