Skip to content

Commit 5206ba2

Browse files
committed
Inspect method should be readonly
1 parent d88105f commit 5206ba2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/vm.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ const {
4444
const {
4545
VMScript
4646
} = require('./script');
47+
const {
48+
inspect
49+
} = require('util');
4750

4851
const objectDefineProperties = Object.defineProperties;
4952

@@ -365,6 +368,8 @@ class VM extends EventEmitter {
365368
_allowAsync: {__proto__: null, value: allowAsync}
366369
});
367370

371+
this.readonly(inspect);
372+
368373
// prepare global sandbox
369374
if (sandbox) {
370375
this.setGlobals(sandbox);

0 commit comments

Comments
 (0)