diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/saved-stacks/function-display-name.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/saved-stacks/function-display-name.js b/js/src/jit-test/tests/saved-stacks/function-display-name.js new file mode 100644 index 0000000000..f10b7de6bd --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/function-display-name.js @@ -0,0 +1,16 @@ +// Test the functionDisplayName of SavedFrame instances. + +function uno() { return dos(); } +const dos = () => tres.quattro(); +let tres = {}; +tres.quattro = () => saveStack() + +const frame = uno(); + +assertEq(frame.functionDisplayName, "tres.quattro"); +assertEq(frame.parent.functionDisplayName, "dos"); +assertEq(frame.parent.parent.functionDisplayName, "uno"); +assertEq(frame.parent.parent.parent.functionDisplayName, null); + +assertEq(frame.parent.parent.parent.parent, null); + |