tor-browser

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

debug-exception-in-fast-import.js (617B)


      1 // |jit-test| skip-if: !wasmDebuggingEnabled()
      2 g = newGlobal({newCompartment: true});
      3 g.parent = this;
      4 g.eval("(" + function() {
      5    Debugger(parent).onExceptionUnwind = function(frame) {}
      6 } + ")()")
      7 
      8 o = {};
      9 
     10 let { exports } = wasmEvalText(`
     11  (module (import "" "inc" (func $imp)) (func) (func $start (call $imp)) (start $start) (export "" (func $start)))
     12 `, {
     13    "": {
     14        inc: function() { o = o.p; }
     15    }
     16 });
     17 
     18 // after instanciation, the start function has been executed and o is undefined.
     19 // This second call will throw in the imported function:
     20 
     21 assertErrorMessage(exports[""], TypeError, /undefined/);