1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/for-of/arrays-growing-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,10 @@ 1.4 +// A for-of loop over an array continues to the end if the array grows during iteration. 1.5 + 1.6 +var a = [0, 1, 1, 0, 1, 0, 0]; 1.7 +var s = ''; 1.8 +for (var v of a) { 1.9 + s += v; 1.10 + if (v === 1) 1.11 + a.push(2); 1.12 +} 1.13 +assertEq(s, '0110100222');