WeakMap-constructor-generator-exception.js (277B)
1 // Iterating over the argument to WeakMap can throw. The exception is 2 // propagated. 3 4 load(libdir + "asserts.js"); 5 6 function* data() { 7 yield [{}, "XR22/Z"]; 8 yield [{}, "23D-BN"]; 9 throw "oops"; 10 } 11 12 var it2 = data(); 13 assertThrowsValue(() => new WeakMap(it2), "oops");