Debian Codegraph @

js/src/jit-test/tests/gc/bug-1825671.js

raw
1 let newTarget = Object.defineProperty(function () {}.bind(), "prototype", {
2 get() {
3 throw 0;
4 }
5 });
6
7 try {
8 Reflect.construct(FinalizationRegistry, [ 1 ], newTarget);
9 } catch (n) {
10 assertEq(n === 0, false);
11 assertEq(n instanceof TypeError, true);
12 }