blob: 69a49b718daad8a1b0d4ba63829433bbb34150c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
const g = newGlobal({newCompartment: true});
g.eval(`
class Base {}
class Derived extends Base {}
this.Derived = Derived;
`);
const dbg = new Debugger(g);
const gw = dbg.addDebuggee(g);
let calleeCount = 0;
dbg.onEnterFrame = frame => {
// Ignore any other callees.
if (frame.callee !== gw.makeDebuggeeValue(g.Derived)) {
return;
}
calleeCount++;
// The implicit rest-argument has the non-identifier name ".args", therefore
// we have to elide from the parameter names array.
assertEq(frame.callee.parameterNames.length, 1);
assertEq(frame.callee.parameterNames[0], undefined);
};
new g.Derived();
// |Derived| should be called at most once.
assertEq(calleeCount, 1);
|