tor-browser

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

recover-inline-arguments-debugger.js (487B)


      1 // |jit-test| --fast-warmup
      2 
      3 g13 = newGlobal({newCompartment: true})
      4 g13.parent = this;
      5 g13.eval("(" + function() {
      6    Debugger(parent).onExceptionUnwind = function(frame) {
      7 while (frame.older) {
      8     frame = frame.older;
      9 }
     10  }
     11 } + ")()");
     12 
     13 function triggerUnwind() {
     14    try {
     15 throw 1;
     16    } catch {}
     17 }
     18 
     19 function foo(depth) {
     20    var dummy = arguments;
     21    if (depth == 0) {
     22 triggerUnwind();
     23    } else {
     24 bar(depth - 1);
     25    }
     26 }
     27 
     28 function bar(depth) {
     29    foo(depth);
     30 }
     31 
     32 bar(50);