Debian Codegraph @

js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js

raw
1 // |jit-test| skip-if: helperThreadCount() === 0
2
3 // Any copyright is dedicated to the Public Domain.
4 // http://creativecommons.org/licenses/publicdomain/
5
6 // Ensure off-thread parse works for ergonomic brand checks.
7
8 load(libdir + 'asserts.js');
9
10 offThreadCompileToStencil(`
11 class A {
12 #x
13 static hx(o) { return #x in o; }
14 };
15
16 throw "Yay"`);
17
18 assertThrowsValue(() => {
19 var stencil = finishOffThreadStencil();
20 evalStencil(stencil);
21 }, 'Yay');