summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/native-calls.js
blob: 4b12ad7383aa0ef4c293f3c97c8e9bdbc1fe4d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
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");