blob: 0e04de6f448df68d8faf09e613ca2720f65ccf3a (
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();
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)');
|