summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/regress/regress-620376-1.js
blob: de55a18c2451cb5c97769978dd78e5d21d668b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// |reftest| skip-if(Android)
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 * Contributors: Igor Bukanov
 */

// Test that we can terminate looping array enumeration
function test() {
    if (typeof timeout != "function")
	return;

    var p = new Proxy({}, { onwKeys: function() { return Array(1e9); }});

    expectExitCode(6);
    timeout(0.001);

    var n = 0;
    for (i in p) { ++n;}
    return n;
}

test();
reportCompare(0, 0, "ok");