summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/proxy-get-trap-table.js
blob: 56158e7b15ca356fff9821207d9a18f9a76aea70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// The 'get' handler should be invoked directly when reading fields of the
// descriptor.

assertErrorMessage(() => {
    var desc = {
        element: "anyfunc",
        initial: 1
    };
    var proxy = new Proxy({}, {
        get: true
    });
    Object.setPrototypeOf(desc, proxy);
    let table = new WebAssembly.Table(desc);
}, TypeError, /proxy handler's get trap/);