Skip to content

Commit c5a3d31

Browse files
committed
v8: move process.binding('v8') to internalBinding
1 parent 1744205 commit c5a3d31

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

β€Žlib/internal/bootstrap/node.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
// that are whitelisted for access via process.binding()... this is used
345345
// to provide a transition path for modules that are being moved over to
346346
// internalBinding.
347-
const internalBindingWhitelist = new SafeSet(['uv', 'http_parser']);
347+
const internalBindingWhitelist = new SafeSet(['uv', 'http_parser', 'v8']);
348348
process.binding = function binding(name) {
349349
return internalBindingWhitelist.has(name) ?
350350
internalBinding(name) :

β€Žlib/v8.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const {
5656
kSpaceUsedSizeIndex,
5757
kSpaceAvailableSizeIndex,
5858
kPhysicalSpaceSizeIndex
59-
} = process.binding('v8');
59+
} = internalBinding('v8');
6060

6161
const kNumberOfHeapSpaces = kHeapSpaces.length;
6262

β€Žsrc/node_v8.ccβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ void Initialize(Local<Object> target,
200200

201201
} // namespace node
202202

203-
NODE_BUILTIN_MODULE_CONTEXT_AWARE(v8, node::Initialize)
203+
NODE_MODULE_CONTEXT_AWARE_INTERNAL(v8, node::Initialize)

β€Žtest/parallel/test-process-binding-internalbinding-whitelist.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ const assert = require('assert');
88
// process.binding().
99
assert(process.binding('uv'));
1010
assert(process.binding('http_parser'));
11+
assert(process.binding('v8'));

0 commit comments

Comments
Β (0)