blob: 265edb556c004c26b30b5d13e68f2559f58f5d91 (
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
|
// Test onNativeCall's behavior when used with self-hosted functions.
load(libdir + 'eqArrayHelper.js');
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var gdbg = dbg.addDebuggee(g);
const rv = [];
dbg.onEnterFrame = f => {
rv.push("EnterFrame");
};
dbg.onNativeCall = f => {
rv.push(f.displayName);
};
gdbg.executeInGlobal(`
var x = [1,3,2];
x.sort((a, b) => {print(a)});
`);
assertEqArray(rv, ["EnterFrame", "sort", "EnterFrame", "print", "EnterFrame", "print"]);
|