summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/native-calls.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/saved-stacks/native-calls.js')
-rw-r--r--js/src/jit-test/tests/saved-stacks/native-calls.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/saved-stacks/native-calls.js b/js/src/jit-test/tests/saved-stacks/native-calls.js
new file mode 100644
index 000000000..4b12ad738
--- /dev/null
+++ b/js/src/jit-test/tests/saved-stacks/native-calls.js
@@ -0,0 +1,12 @@
+// Test that we can save stacks with native code on the stack.
+
+// Unlike Array.prototype.map, Array.prototype.filter is not self-hosted.
+const filter = (function iife() {
+ try {
+ callFunctionFromNativeFrame(n => { throw saveStack() });
+ } catch (s) {
+ return s;
+ }
+}());
+
+assertEq(filter.parent.functionDisplayName, "iife");