summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/instanceof-error-message.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/modules/instanceof-error-message.js')
-rw-r--r--js/src/jit-test/tests/modules/instanceof-error-message.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/modules/instanceof-error-message.js b/js/src/jit-test/tests/modules/instanceof-error-message.js
new file mode 100644
index 0000000000..d78eb333b3
--- /dev/null
+++ b/js/src/jit-test/tests/modules/instanceof-error-message.js
@@ -0,0 +1,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({})));