1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/basic/bug839420.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 +function f() { 1.5 + var x = undefined; 1.6 + try { 1.7 + [1, 2, 3].map(x); 1.8 + assertEq(0, 1); 1.9 + } catch(e) { 1.10 + assertEq(e.toString().contains("x is not"), true); 1.11 + } 1.12 + 1.13 + try { 1.14 + [1, 2, 3].filter(x, 1, 2); 1.15 + assertEq(0, 1); 1.16 + } catch(e) { 1.17 + assertEq(e.toString().contains("x is not"), true); 1.18 + } 1.19 +} 1.20 +f();