summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/savedframe-lookup-in-wasm.js
blob: 6527c78efa7d1bae1f7335082dc27f3f9e2a5ede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
g = newGlobal({newCompartment: true});
g.parent = this;
g.eval(`(function() {
  Debugger(parent).onExceptionUnwind = function(frame) { return frame.eval(""); }
})()`);

var module = new WebAssembly.Module(wasmTextToBinary(`
  (module (import $imp "" "inc") (func) (func $start (call $imp)) (start $start) (export "" (func $start)))
`));

var imports = {
    "": {
        inc: function() { undefined_function(); }
    }
};

new WebAssembly.Instance(module, imports).exports['']();