michael@0: // |jit-test| debug michael@0: // If hasDebuggee(x) is false, removeDebuggee(x) does nothing. michael@0: michael@0: var dbg = new Debugger; michael@0: michael@0: function check(obj) { michael@0: // If obj is something we could never debug, hasDebuggee(obj) is false. michael@0: assertEq(dbg.hasDebuggee(obj), false); michael@0: michael@0: // If hasDebuggee(x) is false, removeDebuggee(x) does nothing. michael@0: assertEq(dbg.removeDebuggee(obj), undefined); michael@0: } michael@0: michael@0: // global objects which happen not to be debuggees at the moment michael@0: var g1 = newGlobal('same-compartment'); michael@0: check(g1); michael@0: michael@0: // objects in a compartment that is already debugging us michael@0: var g2 = newGlobal(); michael@0: g2.parent = this; michael@0: g2.eval("var dbg = new Debugger(parent);"); michael@0: check(g2);