1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/saved-stacks/generators.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +// Test that we can save stacks which have generator frames. 1.5 + 1.6 +const { value: frame } = (function iife1() { 1.7 + return (function* generator() { 1.8 + yield (function iife2() { 1.9 + return saveStack(); 1.10 + }()); 1.11 + }()).next(); 1.12 +}()); 1.13 + 1.14 +assertEq(frame.functionDisplayName, "iife2"); 1.15 +assertEq(frame.parent.functionDisplayName, "generator"); 1.16 +assertEq(frame.parent.parent.functionDisplayName, "iife1"); 1.17 +assertEq(frame.parent.parent.parent.functionDisplayName, null); 1.18 +assertEq(frame.parent.parent.parent.parent, null);