summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Set-iterator-gc-2.js
blob: 41979b86a84b47ed41d5862acb2bb1f1a92c9403 (plain)
1
2
3
4
5
6
7
8
// GC-ing during a for-of loop doesn't crash.

var i = 0;
for (var x of new Set(Object.getOwnPropertyNames(this))) {
    gc();
    if (++i >= 20)
        break;
}