mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
vm: move process.binding('contextify') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22419 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
6 files changed
+8
-5
No files matched your search
@@ -107,7 +107,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
const { ContextifyScript } = process.binding('contextify');
|
||||
const { ContextifyScript } = internalBinding('contextify');
|
||||
|
||||
// Set up NativeModule
|
||||
function NativeModule(id) {
|
||||
|
||||
@@ -351,7 +351,8 @@
|
||||
'v8',
|
||||
'stream_wrap',
|
||||
'signal_wrap',
|
||||
'crypto']);
|
||||
'crypto',
|
||||
'contextify']);
|
||||
process.binding = function binding(name) {
|
||||
return internalBindingWhitelist.has(name) ?
|
||||
internalBinding(name) :
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
const { internalBinding } = require('internal/bootstrap/loaders');
|
||||
const { URL } = require('internal/url');
|
||||
const { isContext } = process.binding('contextify');
|
||||
const { isContext } = internalBinding('contextify');
|
||||
const {
|
||||
ERR_INVALID_ARG_TYPE,
|
||||
ERR_VM_MODULE_ALREADY_LINKED,
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const { internalBinding } = require('internal/bootstrap/loaders');
|
||||
const {
|
||||
ContextifyScript,
|
||||
makeContext,
|
||||
isContext: _isContext,
|
||||
} = process.binding('contextify');
|
||||
} = internalBinding('contextify');
|
||||
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
|
||||
const { isUint8Array } = require('internal/util/types');
|
||||
const { validateInt32, validateUint32 } = require('internal/validators');
|
||||
|
||||
@@ -958,4 +958,4 @@ void Initialize(Local<Object> target,
|
||||
} // namespace contextify
|
||||
} // namespace node
|
||||
|
||||
NODE_BUILTIN_MODULE_CONTEXT_AWARE(contextify, node::contextify::Initialize)
|
||||
NODE_MODULE_CONTEXT_AWARE_INTERNAL(contextify, node::contextify::Initialize)
|
||||
@@ -11,3 +11,4 @@ assert(process.binding('http_parser'));
|
||||
assert(process.binding('v8'));
|
||||
assert(process.binding('stream_wrap'));
|
||||
assert(process.binding('signal_wrap'));
|
||||
assert(process.binding('contextify'));
|
||||
Reference in new issue
Block a user