Weak Map stress test

# David Bruant (14 years ago)

I've thought about this test:

var wm = WeakMap(); var key = {}, value = {};

while(true){ wm.set(key, value); key = value; value = {}; }

At each loop turn, the reference of the "key" object is lost, so it's garbage collectable. After a second turn, the "value" object of this entry becomes garbage-collectable too.

There isn't that much of a conformance test here, but It'd be good to expect ES engines to survive this test for as long as possible. I cannot add this test to any official test suite, so if you think it has value, just take it. I release it as public domain. Do whatever you cant with it as long as it makes ES engines better in any way.