Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 26f356f

Browse filesBrowse files
madeinjamMylesBorins
authored andcommitted
lib: migrate from process.binding to internalBinding
We are migrating towards using internalBinding(\'options\').getOptions() instead of process.binding(\'config\') to access the value of the --experimental-vm-modules command line option. PR-URL: #23586 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 6acc891 commit 26f356f
Copy full SHA for 26f356f

File tree

Expand file treeCollapse file tree

2 files changed

+16
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-1
lines changed
Open diff view settings
Collapse file

‎lib/vm.js‎

Copy file name to clipboardExpand all lines: lib/vm.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ module.exports = {
402402
compileFunction,
403403
};
404404

405-
if (process.binding('config').experimentalVMModules) {
405+
if (internalBinding('options').getOptions('--experimental-vm-modules')) {
406406
const { SourceTextModule } = require('internal/vm/source_text_module');
407407
module.exports.SourceTextModule = SourceTextModule;
408408
}
Collapse file
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Flags: --expose-internals
2+
'use strict';
3+
4+
const common = require('../common');
5+
6+
// This is to ensure that the sendInspectorCommand function calls the error
7+
// function if its called with the v8_enable_inspector is disabled
8+
9+
process.config.variables.v8_enable_inspector = 0;
10+
const inspector = require('internal/util/inspector');
11+
12+
inspector.sendInspectorCommand(
13+
common.mustNotCall('Inspector callback should not be called'),
14+
common.mustCall(1),
15+
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.