tor-browser

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

Frame-terminated-01.js (355B)


      1 // Check `.terminated` functionality for normal functions.
      2 
      3 const g = newGlobal({ newCompartment: true });
      4 const dbg = new Debugger(g);
      5 
      6 g.eval(`
      7 function f(){}
      8 `);
      9 
     10 let frame;
     11 dbg.onEnterFrame = function(f) {
     12  frame = f;
     13  assertEq(frame.terminated, false);
     14 };
     15 
     16 g.f();
     17 
     18 assertEq(frame instanceof Debugger.Frame, true);
     19 assertEq(frame.terminated, true);