1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/saved-stacks/native-calls.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// Test that we can save stacks with native code on the stack. 1.5 + 1.6 +// Unlike Array.prototype.map, Array.prototype.filter is not self-hosted. 1.7 +const filter = (function iife() { 1.8 + try { 1.9 + [3].filter(n => { throw saveStack() }); 1.10 + } catch (s) { 1.11 + return s; 1.12 + } 1.13 +}()); 1.14 + 1.15 +assertEq(filter.parent.functionDisplayName, "iife");