summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/instanceof-error-message.js
blob: d78eb333b3a6bf0afad4029a31cec883e9e9e827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function getInstanceOfErrorMessage(x) {
    try {
        var result = {} instanceof x;
    }
    catch (e) {
        return e.message;
    }
}

// Error message for a Module Namespace Exotic Object should be same as normal
// non-callable when using 'instanceof'
import('empty.js').then(
    m => assertEq(getInstanceOfErrorMessage(m),
                  getInstanceOfErrorMessage({})));