tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Debugger-debuggees-09.js (642B)


      1 // If hasDebuggee(x) is false, removeDebuggee(x) does nothing.
      2 
      3 var dbg = new Debugger;
      4 
      5 function check(obj) {
      6    // If obj is something we could never debug, hasDebuggee(obj) is false.
      7    assertEq(dbg.hasDebuggee(obj), false);
      8 
      9    // If hasDebuggee(x) is false, removeDebuggee(x) does nothing.
     10    assertEq(dbg.removeDebuggee(obj), undefined);
     11 }
     12 
     13 // global objects which happen not to be debuggees at the moment
     14 var g1 = newGlobal('same-compartment');
     15 check(g1);
     16 
     17 // objects in a compartment that is already debugging us
     18 var g2 = newGlobal({newCompartment: true});
     19 g2.parent = this;
     20 g2.eval("var dbg = new Debugger(parent);");
     21 check(g2);