| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,7 @@ const { | |||
| 57 | 57 | } = require('internal/util/types'); | |
| 58 | 58 | const { | |
| 59 | 59 | pendingDeprecation | |
| 60 | - } = internalBinding('config'); | ||
| 60 | + } = process.binding('config'); | ||
| 61 | 61 | const { | |
| 62 | 62 | formatProperty, | |
| 63 | 63 | kObjectType | |
@@ -1083,7 +1083,7 @@ Buffer.prototype.swap64 = function swap64() { | |||
| 1083 | 1083 | Buffer.prototype.toLocaleString = Buffer.prototype.toString; | |
| 1084 | 1084 | ||
| 1085 | 1085 | let transcode; | |
| 1086 | - if (internalBinding('config').hasIntl) { | ||
| 1086 | + if (process.binding('config').hasIntl) { | ||
| 1087 | 1087 | const { | |
| 1088 | 1088 | icuErrName, | |
| 1089 | 1089 | transcode: _transcode | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,7 +40,7 @@ const pendingDeprecation = getOptionValue('--pending-deprecation'); | |||
| 40 | 40 | const { | |
| 41 | 41 | fipsMode, | |
| 42 | 42 | fipsForced | |
| 43 | - } = internalBinding('config'); | ||
| 43 | + } = process.binding('config'); | ||
| 44 | 44 | const { getFipsCrypto, setFipsCrypto } = internalBinding('crypto'); | |
| 45 | 45 | const { | |
| 46 | 46 | randomBytes, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,7 @@ function fatalError(e) { | |||
| 107 | 107 | Error.captureStackTrace(o, fatalError); | |
| 108 | 108 | process._rawDebug(o.stack); | |
| 109 | 109 | } | |
| 110 | - if (internalBinding('config').shouldAbortOnUncaughtException) { | ||
| 110 | + if (process.binding('config').shouldAbortOnUncaughtException) { | ||
| 111 | 111 | process.abort(); | |
| 112 | 112 | } | |
| 113 | 113 | process.exit(1); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,7 +79,6 @@ | |||
| 79 | 79 | 'buffer', | |
| 80 | 80 | 'cares_wrap', | |
| 81 | 81 | 'constants', | |
| 82 | - 'config', | ||
| 83 | 82 | 'contextify', | |
| 84 | 83 | 'crypto', | |
| 85 | 84 | 'fs_event_wrap', | |
@@ -165,7 +164,7 @@ | |||
| 165 | 164 | NativeModule._source = getInternalBinding('natives'); | |
| 166 | 165 | NativeModule._cache = {}; | |
| 167 | 166 | ||
| 168 | - const config = getInternalBinding('config'); | ||
| 167 | + const config = getBinding('config'); | ||
| 169 | 168 | ||
| 170 | 169 | // Think of this as module.exports in this file even though it is not | |
| 171 | 170 | // written in CommonJS style. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -175,7 +175,7 @@ | |||
| 175 | 175 | { | |
| 176 | 176 | // Install legacy getters on the `util` binding for typechecking. | |
| 177 | 177 | // TODO(addaleax): Turn into a full runtime deprecation. | |
| 178 | - const { pendingDeprecation } = internalBinding('config'); | ||
| 178 | + const { pendingDeprecation } = process.binding('config'); | ||
| 179 | 179 | const utilBinding = internalBinding('util'); | |
| 180 | 180 | const types = internalBinding('types'); | |
| 181 | 181 | for (const name of [ | |
@@ -637,7 +637,7 @@ | |||
| 637 | 637 | } | |
| 638 | 638 | ||
| 639 | 639 | function setupProcessICUVersions() { | |
| 640 | - const icu = internalBinding('config').hasIntl ? | ||
| 640 | + const icu = process.binding('config').hasIntl ? | ||
| 641 | 641 | internalBinding('icu') : undefined; | |
| 642 | 642 | if (!icu) return; // no Intl/ICU: nothing to add here. | |
| 643 | 643 | // With no argument, getVersion() returns a comma separated list | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -342,7 +342,7 @@ Object.defineProperties( | |||
| 342 | 342 | } }); | |
| 343 | 343 | ||
| 344 | 344 | const TextDecoder = | |
| 345 | - internalBinding('config').hasIntl ? | ||
| 345 | + process.binding('config').hasIntl ? | ||
| 346 | 346 | makeTextDecoderICU() : | |
| 347 | 347 | makeTextDecoderJS(); | |
| 348 | 348 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ let config; | |||
| 12 | 12 | ||
| 13 | 13 | function lazyHookCreation() { | |
| 14 | 14 | const { createHook } = require('async_hooks'); | |
| 15 | - config = internalBinding('config'); | ||
| 15 | + config = process.binding('config'); | ||
| 16 | 16 | ||
| 17 | 17 | hook = createHook({ | |
| 18 | 18 | init(asyncId, type, triggerAsyncId, resource) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ for (const key of Object.keys(types)) | |||
| 9 | 9 | ||
| 10 | 10 | // Environment variables are parsed ad-hoc throughout the code base, | |
| 11 | 11 | // so we gather the documentation here. | |
| 12 | - const { hasIntl, hasSmallICU, hasNodeOptions } = internalBinding('config'); | ||
| 12 | + const { hasIntl, hasSmallICU, hasNodeOptions } = process.binding('config'); | ||
| 13 | 13 | const envVars = new Map([ | |
| 14 | 14 | ['NODE_DEBUG', { helpText: "','-separated list of core modules that " + | |
| 15 | 15 | 'should print debug information' }], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ CSI.kClearToEnd = CSI`0K`; | |||
| 30 | 30 | CSI.kClearLine = CSI`2K`; | |
| 31 | 31 | CSI.kClearScreenDown = CSI`0J`; | |
| 32 | 32 | ||
| 33 | - if (internalBinding('config').hasIntl) { | ||
| 33 | + if (process.binding('config').hasIntl) { | ||
| 34 | 34 | const icu = internalBinding('icu'); | |
| 35 | 35 | getStringWidth = function getStringWidth(str, options) { | |
| 36 | 36 | options = options || {}; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - const { hasTracing } = internalBinding('config'); | ||
| 3 | + const { hasTracing } = process.binding('config'); | ||
| 4 | 4 | const kHandle = Symbol('handle'); | |
| 5 | 5 | const kEnabled = Symbol('enabled'); | |
| 6 | 6 | const kCategories = Symbol('categories'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments