|
19 | 19 | const { internalBinding, NativeModule } = loaderExports; |
20 | 20 |
|
21 | 21 | const { getOptionValue } = NativeModule.require('internal/options'); |
| 22 | +const config = internalBinding('config'); |
22 | 23 |
|
23 | 24 | function startup() { |
24 | 25 | setupTraceCategoryState(); |
@@ -164,7 +165,7 @@ function startup() { |
164 | 165 | NativeModule.require('internal/process/coverage').setupExitHooks(); |
165 | 166 | } |
166 | 167 |
|
167 | | - if (process.config.variables.v8_enable_inspector) { |
| 168 | + if (config.hasInspector) { |
168 | 169 | NativeModule.require('internal/inspector_async_hook').setup(); |
169 | 170 | } |
170 | 171 |
|
@@ -280,7 +281,7 @@ function startup() { |
280 | 281 |
|
281 | 282 | // TODO(joyeecheung): this property has not been well-maintained, should we |
282 | 283 | // deprecate it in favor of a better API? |
283 | | - const { isDebugBuild, hasOpenSSL } = internalBinding('config'); |
| 284 | + const { isDebugBuild, hasOpenSSL } = config; |
284 | 285 | Object.defineProperty(process, 'features', { |
285 | 286 | enumerable: true, |
286 | 287 | writable: false, |
@@ -630,7 +631,7 @@ function setupGlobalConsole() { |
630 | 631 | writable: true |
631 | 632 | }); |
632 | 633 | // TODO(joyeecheung): can we skip this if inspector is not active? |
633 | | - if (process.config.variables.v8_enable_inspector) { |
| 634 | + if (config.hasInspector) { |
634 | 635 | const inspector = |
635 | 636 | NativeModule.require('internal/console/inspector'); |
636 | 637 | inspector.addInspectorApis(consoleFromNode, consoleFromVM); |
|
0 commit comments