diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/saved-stacks/generators.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/saved-stacks/generators.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,15 @@ +// Test that we can save stacks which have generator frames. + +const { value: frame } = (function iife1() { + return (function* generator() { + yield (function iife2() { + return saveStack(); + }()); + }()).next(); +}()); + +assertEq(frame.functionDisplayName, "iife2"); +assertEq(frame.parent.functionDisplayName, "generator"); +assertEq(frame.parent.parent.functionDisplayName, "iife1"); +assertEq(frame.parent.parent.parent.functionDisplayName, null); +assertEq(frame.parent.parent.parent.parent, null);