Skip to content
Permalink
Browse files

vm: move process.binding('contextify') to internalBinding

PR-URL: #22419
Refs: #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>
  • Loading branch information
jasnell committed Aug 20, 2018
1 parent 3b5c992 commit 4963a04b304e5417f5ba8f769ae8040c18fd018d
@@ -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'));

0 comments on commit 4963a04

Please sign in to comment.
You can’t perform that action at this time.