diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index e6c4da25b00d9b..32a62171da98ed 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -344,7 +344,7 @@ // that are whitelisted for access via process.binding()... this is used // to provide a transition path for modules that are being moved over to // internalBinding. - const internalBindingWhitelist = new SafeSet(['uv', 'http_parser']); + const internalBindingWhitelist = new SafeSet(['uv', 'http_parser', 'v8']); process.binding = function binding(name) { return internalBindingWhitelist.has(name) ? internalBinding(name) : diff --git a/lib/v8.js b/lib/v8.js index bca70996209d95..c6ac8b362fba96 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -56,7 +56,7 @@ const { kSpaceUsedSizeIndex, kSpaceAvailableSizeIndex, kPhysicalSpaceSizeIndex -} = process.binding('v8'); +} = internalBinding('v8'); const kNumberOfHeapSpaces = kHeapSpaces.length; diff --git a/src/node_v8.cc b/src/node_v8.cc index fb0a9fea1e5d27..2a661d95497a85 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -200,4 +200,4 @@ void Initialize(Local target, } // namespace node -NODE_BUILTIN_MODULE_CONTEXT_AWARE(v8, node::Initialize) +NODE_MODULE_CONTEXT_AWARE_INTERNAL(v8, node::Initialize) diff --git a/test/parallel/test-process-binding-internalbinding-whitelist.js b/test/parallel/test-process-binding-internalbinding-whitelist.js index bfb265a2994952..e8c3b76214fa7a 100644 --- a/test/parallel/test-process-binding-internalbinding-whitelist.js +++ b/test/parallel/test-process-binding-internalbinding-whitelist.js @@ -8,3 +8,4 @@ const assert = require('assert'); // process.binding(). assert(process.binding('uv')); assert(process.binding('http_parser')); +assert(process.binding('v8'));