1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/saved-stacks/function-display-name.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 +// Test the functionDisplayName of SavedFrame instances. 1.5 + 1.6 +function uno() { return dos(); } 1.7 +const dos = () => tres.quattro(); 1.8 +const tres = { 1.9 + quattro: () => saveStack() 1.10 +}; 1.11 + 1.12 +const frame = uno(); 1.13 + 1.14 +assertEq(frame.functionDisplayName, "tres.quattro"); 1.15 +assertEq(frame.parent.functionDisplayName, "dos"); 1.16 +assertEq(frame.parent.parent.functionDisplayName, "uno"); 1.17 +assertEq(frame.parent.parent.parent.functionDisplayName, null); 1.18 + 1.19 +assertEq(frame.parent.parent.parent.parent, null); 1.20 +