diff options
author | James M Snell <jasnell@gmail.com> | 2018-07-30 01:34:51 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-09 07:30:58 -0700 |
commit | 9f5cc1fc92918c387ec007944b5a53566b428adb (patch) | |
tree | 7ff22466b182f20bd9d2981f25435d43b85ff91a /lib | |
parent | 4253e5583bf4b50ef0b3b2776581d8ca8d8bcd1d (diff) | |
download | android-node-v8-9f5cc1fc92918c387ec007944b5a53566b428adb.tar.gz android-node-v8-9f5cc1fc92918c387ec007944b5a53566b428adb.tar.bz2 android-node-v8-9f5cc1fc92918c387ec007944b5a53566b428adb.zip |
src: move process.binding('performance') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/bootstrap/node.js | 2 | ||||
-rw-r--r-- | lib/internal/test/binding.js | 7 | ||||
-rw-r--r-- | lib/perf_hooks.js | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 016c0c5e23..d46b0308c6 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -84,7 +84,7 @@ workerThreadSetup.setupStdio(); } - const perf = process.binding('performance'); + const perf = internalBinding('performance'); const { NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE, } = perf.constants; diff --git a/lib/internal/test/binding.js b/lib/internal/test/binding.js index f9f018a782..8c19be8ac0 100644 --- a/lib/internal/test/binding.js +++ b/lib/internal/test/binding.js @@ -5,10 +5,5 @@ process.emitWarning( 'tracked by any versioning system or deprecation process.', 'internal/test/binding'); -// These exports should be scoped as specifically as possible -// to avoid exposing APIs because even with that warning and -// this file being internal people will still try to abuse it. const { internalBinding } = require('internal/bootstrap/loaders'); -module.exports = { - ModuleWrap: internalBinding('module_wrap').ModuleWrap, -}; +module.exports = { internalBinding }; diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index f7b18816e6..2e850db871 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -1,5 +1,6 @@ 'use strict'; +const { internalBinding } = require('internal/bootstrap/loaders'); const { PerformanceEntry, mark: _mark, @@ -12,7 +13,7 @@ const { timeOriginTimestamp, timerify, constants -} = process.binding('performance'); +} = internalBinding('performance'); const { NODE_PERFORMANCE_ENTRY_TYPE_NODE, |