Skip to content

Commit

Permalink
child_process: move process.binding('spawn_sync') to internalBinding
Browse files Browse the repository at this point in the history
PR-URL: #22260
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
antsmartian authored and targos committed Sep 15, 2018
1 parent dadd6e1 commit 9c9c01f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@
'tls_wrap',
'util',
'async_wrap',
'url']);
'url',
'spawn_sync']);
process.binding = function binding(name) {
return internalBindingWhitelist.has(name) ?
internalBinding(name) :
Expand Down
3 changes: 1 addition & 2 deletions lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const util = require('util');
const assert = require('assert');

const { internalBinding } = require('internal/bootstrap/loaders');

const { Process } = internalBinding('process_wrap');
const { WriteWrap } = internalBinding('stream_wrap');
const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap');
Expand All @@ -33,7 +32,7 @@ const SocketList = require('internal/socket_list');
const { owner_symbol } = require('internal/async_hooks').symbols;
const { convertToValidSignal } = require('internal/util');
const { isArrayBufferView } = require('internal/util/types');
const spawn_sync = process.binding('spawn_sync');
const spawn_sync = internalBinding('spawn_sync');
const { HTTPParser } = internalBinding('http_parser');
const { freeParser } = require('_http_common');
const { kStateSymbol } = require('internal/dgram');
Expand Down
2 changes: 1 addition & 1 deletion src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,5 +1100,5 @@ void SyncProcessRunner::KillTimerCloseCallback(uv_handle_t* handle) {

} // namespace node

NODE_BUILTIN_MODULE_CONTEXT_AWARE(spawn_sync,
NODE_MODULE_CONTEXT_AWARE_INTERNAL(spawn_sync,
node::SyncProcessRunner::Initialize)
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ assert(process.binding('stream_wrap'));
assert(process.binding('signal_wrap'));
assert(process.binding('contextify'));
assert(process.binding('url'));
assert(process.binding('spawn_sync'));

0 comments on commit 9c9c01f

Please sign in to comment.