|
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();
|
@@ -156,7 +157,7 @@ function startup() {
|
156 | 157 | NativeModule.require('internal/process/coverage').setupExitHooks();
|
157 | 158 | }
|
158 | 159 |
|
159 |
| - if (process.config.variables.v8_enable_inspector) { |
| 160 | + if (config.hasInspector) { |
160 | 161 | NativeModule.require('internal/inspector_async_hook').setup();
|
161 | 162 | }
|
162 | 163 |
|
@@ -296,7 +297,7 @@ function startup() {
|
296 | 297 |
|
297 | 298 | // TODO(joyeecheung): this property has not been well-maintained, should we
|
298 | 299 | // deprecate it in favor of a better API?
|
299 |
| - const { isDebugBuild, hasOpenSSL } = internalBinding('config'); |
| 300 | + const { isDebugBuild, hasOpenSSL } = config; |
300 | 301 | Object.defineProperty(process, 'features', {
|
301 | 302 | enumerable: true,
|
302 | 303 | writable: false,
|
@@ -636,7 +637,7 @@ function setupGlobalConsole() {
|
636 | 637 | writable: true
|
637 | 638 | });
|
638 | 639 | // TODO(joyeecheung): can we skip this if inspector is not active?
|
639 |
| - if (process.config.variables.v8_enable_inspector) { |
| 640 | + if (config.hasInspector) { |
640 | 641 | const inspector =
|
641 | 642 | NativeModule.require('internal/console/inspector');
|
642 | 643 | inspector.addInspectorApis(consoleFromNode, consoleFromVM);
|
|
0 commit comments