lib: migrate process.binding to getOptions

PR-URL: https://github.com/nodejs/node/pull/23522
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Randy Wressell 2018-10-12 10:07:49 -07:00 committed by Ruben Bridgewater
parent 495ced01fd
commit 101812e0a9
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -9,6 +9,8 @@ const {
CHAR_HASH,
} = require('internal/constants');
const { getOptions } = internalBinding('options');
// Invoke with makeRequireFunction(module) where |module| is the Module object
// to use as the context for the require() function.
function makeRequireFunction(mod) {
@ -105,7 +107,7 @@ const builtinLibs = [
'v8', 'vm', 'zlib'
];
if (process.binding('config').experimentalWorker) {
if (getOptions('--experimental-worker')) {
builtinLibs.push('worker_threads');
builtinLibs.sort();
}