summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Map-constructor-generator-exception.js
blob: c3ec3c1c7280ae2658961dce2864aa75bd7124f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Iterating over the argument to Map can throw. The exception is propagated.

load(libdir + "asserts.js");

function data2() {
    yield [{}, "XR22/Z"];
    yield [{}, "23D-BN"];
    throw "oops";
}

var it = data2();
assertThrowsValue(function () { new Map(it); }, "oops");