Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawn_sync: move process.binding('spawn_sync') to internalBinding #22260

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@
'contextify',
'tcp_wrap',
'tls_wrap',
'async_wrap']);
'async_wrap',
'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 @@ -1099,5 +1099,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 @@ -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('spawn_sync'));