1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/basic/bug790629-4.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +// 'this' in a generator-expression non-strict function produces the expected 1.5 +// object. 1.6 + 1.7 +Number.prototype.iters = function () { 1.8 + return [(this for (x of [0])), 1.9 + (this for (y of [0]))]; 1.10 +}; 1.11 + 1.12 +var [a, b] = (3).iters(); 1.13 +var three = a.next(); 1.14 +assertEq(Object.prototype.toString.call(three), '[object Number]'); 1.15 +assertEq(+three, 3); 1.16 +assertEq(b.next(), three);