summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/auto-regress/for-of-iterator-close-debugger.js
blob: a4d0bf654ee350fb87d4c8fe814a8451565d7b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |jit-test| error:ReferenceError

// for-of should close iterator even if the exception is once caught by the
// debugger.

var g = newGlobal();
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () { };");
// jsfunfuzz-generated
for (var x of []) {};
for (var l of [0]) {
    for (var y = 0; y < 1; y++) {
        g2;
    }
}