summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-05.js
blob: 4ec3edc19834e12936b350a67c04cfcd266ae8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// An onNewGlobalObject handler can disable itself.

var dbg = new Debugger;
var log;

dbg.onNewGlobalObject = function (global) {
  log += 'n';
  dbg.onNewGlobalObject = undefined;
};

log = '';
newGlobal();
assertEq(log, 'n');