summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/function-display-name.js
blob: f10b7de6bd6d09d3160fb8712a553bb390510efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);