mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 08:05:29 +00:00
test: add test case that crashes when throwing an exception with vm.Script
It failed with `FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal`.
This commit is contained in:
parent
60f47110fa
commit
19a1b2e414
14
test/parallel/test-vm-script-throw-in-tostring.js
Normal file
14
test/parallel/test-vm-script-throw-in-tostring.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
require('../common');
|
||||||
|
const assert = require('assert');
|
||||||
|
|
||||||
|
const vm = require('vm');
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
new vm.Script({
|
||||||
|
toString() {
|
||||||
|
throw new Error();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, Error);
|
Loading…
Reference in New Issue
Block a user