summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/profiler/AutoEntryMonitor-02.js
blob: 1aee82068c0b20a24a19f06ba8a5e060e1d15224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Nested uses of AutoEntryMonitor should behave with decorum.

load(libdir + 'array-compare.js');

function Cobb() {
  var twoShot = { toString: function Saito() { return Object; },
                  valueOf: function Fischer() { return "Ariadne"; } };
  assertEq(arraysEqual(entryPoints({ ToString: twoShot }),
                       [ "Saito", "Fischer" ]), true);
}

assertEq(arraysEqual(entryPoints({ function: Cobb }), ["Cobb"]), true);