Skip to content
Permalink
Browse files

url: move process.binding('url') to internalBinding

PR-URL: #22204
Refs: #22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
  • Loading branch information...
starkwang committed Aug 9, 2018
1 parent 83c1ba3 commit e917a23d2e8269eec48e95bcebcb9f7c6c5e4e3d
@@ -375,7 +375,8 @@
'tcp_wrap',
'tls_wrap',
'util',
'async_wrap']);
'async_wrap',
'url']);
process.binding = function binding(name) {
return internalBindingWhitelist.has(name) ?
internalBinding(name) :
@@ -37,6 +37,7 @@ let querystring;
const { platform } = process;
const isWindows = platform === 'win32';

const { internalBinding } = require('internal/bootstrap/loaders');
const {
domainToASCII: _domainToASCII,
domainToUnicode: _domainToUnicode,
@@ -60,7 +61,7 @@ const {
kPort,
kQuery,
kSchemeStart
} = process.binding('url');
} = internalBinding('url');

const context = Symbol('context');
const cannotBeBase = Symbol('cannot-be-base');
@@ -2420,4 +2420,4 @@ static void Initialize(Local<Object> target,
} // namespace url
} // namespace node

NODE_BUILTIN_MODULE_CONTEXT_AWARE(url, node::url::Initialize)
NODE_MODULE_CONTEXT_AWARE_INTERNAL(url, node::url::Initialize)
@@ -12,3 +12,4 @@ assert(process.binding('v8'));
assert(process.binding('stream_wrap'));
assert(process.binding('signal_wrap'));
assert(process.binding('contextify'));
assert(process.binding('url'));

0 comments on commit e917a23

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