Debian Codegraph @

js/src/jit-test/tests/modules/instanceof-error-message.js

raw
1 function getInstanceOfErrorMessage(x) {
2 try {
3 var result = {} instanceof x;
4 }
5 catch (e) {
6 return e.message;
7 }
8 }
9
10 // Error message for a Module Namespace Exotic Object should be same as normal
11 // non-callable when using 'instanceof'
12 import('empty.js').then(
13 m => assertEq(getInstanceOfErrorMessage(m),
14 getInstanceOfErrorMessage({})));