Skip to content

Commit 19a1b2e

Browse files
committed
test: add test case that crashes when throwing an exception with vm.Script
It failed with `FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal`.
1 parent 60f4711 commit 19a1b2e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
require('../common');
4+
const assert = require('assert');
5+
6+
const vm = require('vm');
7+
8+
assert.throws(() => {
9+
new vm.Script({
10+
toString() {
11+
throw new Error();
12+
}
13+
});
14+
}, Error);

0 commit comments

Comments
 (0)