tor-browser

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

Frame-onStep-resumption-01.js (360B)


      1 // If frame.onStep returns {return:val}, the frame returns.
      2 
      3 var g = newGlobal({newCompartment: true});
      4 g.eval("function f(x) {\n" +
      5       "    var a = x * x;\n" +
      6       "    return a;\n" +
      7       "}\n");
      8 
      9 var dbg = Debugger(g);
     10 dbg.onEnterFrame = function (frame) {
     11    frame.onStep = function () { return {return: "pass"}; };
     12 };
     13 
     14 assertEq(g.f(4), "pass");