Skip to content

Commit 56cf058

Browse files
committed
child_process: make process_wrap binding internal
PR-URL: #22479 Refs: #22160 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 68dff4a commit 56cf058

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

lib/internal/bootstrap/node.js

+1
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
new SafeSet([
351351
'uv',
352352
'http_parser',
353+
'process_wrap',
353354
'v8',
354355
'stream_wrap',
355356
'signal_wrap',

lib/internal/child_process.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const assert = require('assert');
2323

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

26-
const { Process } = process.binding('process_wrap');
26+
const { Process } = internalBinding('process_wrap');
2727
const { WriteWrap } = internalBinding('stream_wrap');
2828
const { Pipe, constants: PipeConstants } = process.binding('pipe_wrap');
2929
const { TTY } = process.binding('tty_wrap');

src/process_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,4 +315,4 @@ class ProcessWrap : public HandleWrap {
315315
} // anonymous namespace
316316
} // namespace node
317317

318-
NODE_BUILTIN_MODULE_CONTEXT_AWARE(process_wrap, node::ProcessWrap::Initialize)
318+
NODE_MODULE_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize)

test/parallel/test-process-wrap.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Flags: --expose-internals
12
// Copyright Joyent, Inc. and other Node contributors.
23
//
34
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,7 +23,8 @@
2223
'use strict';
2324
require('../common');
2425
const assert = require('assert');
25-
const Process = process.binding('process_wrap').Process;
26+
const { internalBinding } = require('internal/test/binding');
27+
const Process = internalBinding('process_wrap').Process;
2628
const { Pipe, constants: PipeConstants } = process.binding('pipe_wrap');
2729
const pipe = new Pipe(PipeConstants.SOCKET);
2830
const p = new Process();

test/sequential/test-async-wrap-getasyncid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
182182
}
183183

184184
{
185-
const Process = process.binding('process_wrap').Process;
185+
const Process = internalBinding('process_wrap').Process;
186186
testInitialized(new Process(), 'Process');
187187
}
188188

0 commit comments

Comments
 (0)