diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js')
-rw-r--r-- | js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js b/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js new file mode 100644 index 0000000000..2afa881f3a --- /dev/null +++ b/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js @@ -0,0 +1,11 @@ +let g = newGlobal(); + +let error = g.eval("Error()"); + +// This should not throw. +assertEq(typeof error.stack, "string"); + +g.error = Error(); + +// Nor should this. +assertEq(g.eval("typeof error.stack"), "string"); |