summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/debug-osr.js
blob: e8d3285ed490163a28b91c75a6b49bc52fe774e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |jit-test| skip-if: !wasmDebuggingEnabled()
g = newGlobal({newCompartment: true});
g.parent = this;
g.eval("(" + function() {
    Debugger(parent).onExceptionUnwind = function(frame) {
        frame.older
    }
} + ")()");

let o = {};

let func = wasmEvalText(`
  (module (import "" "inc" (func $imp)) (func) (func $start (call $imp)) (start $start) (export "" (func $start)))
`, { "": { inc: function() { o = o.set; } } }).exports[""];

assertErrorMessage(func, TypeError, /(is|of) undefined/);