blob: 2fd37c27bbf202ddeb8a08201415b6ffbc4de768 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// A garbage collection in the debugger compartment does not disturb onPop
// handlers.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
var log;
dbg.onEnterFrame = function handleEnter(frame) {
log += '(';
frame.onPop = function handlePop(completion) {
log += ')';
};
};
dbg.onDebuggerStatement = function handleDebugger (frame) {
log += 'd';
// GC in the debugger's compartment only.
gc(dbg);
};
log = '';
assertEq(g.eval('debugger; 42;'), 42);
assertEq(log, '(d)');
|