summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js
blob: 1b10df81741b0c0efc61a2000cd66661727092bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |jit-test| skip-if: helperThreadCount() === 0

// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/

// Ensure off-thread parse works for ergonomic brand checks.

load(libdir + 'asserts.js');

offThreadCompileToStencil(`
    class A {
        #x
        static hx(o) { return #x in o; }
    };

    throw "Yay"`);

assertThrowsValue(() => {
    var stencil = finishOffThreadStencil();
    evalStencil(stencil);
}, 'Yay');