summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/function-display-name.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/saved-stacks/function-display-name.js')
-rw-r--r--js/src/jit-test/tests/saved-stacks/function-display-name.js17
1 files changed, 17 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 000000000..cfe175758
--- /dev/null
+++ b/js/src/jit-test/tests/saved-stacks/function-display-name.js
@@ -0,0 +1,17 @@
+// Test the functionDisplayName of SavedFrame instances.
+
+function uno() { return dos(); }
+const dos = () => tres.quattro();
+const 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);
+