Skip to content

Commit

Permalink
child_process: make process_wrap binding internal
Browse files Browse the repository at this point in the history
PR-URL: #22479
Refs: #22160
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig committed Aug 27, 2018
1 parent 68dff4a commit 56cf058
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
new SafeSet([
'uv',
'http_parser',
'process_wrap',
'v8',
'stream_wrap',
'signal_wrap',
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const assert = require('assert');

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

const { Process } = process.binding('process_wrap');
const { Process } = internalBinding('process_wrap');
const { WriteWrap } = internalBinding('stream_wrap');
const { Pipe, constants: PipeConstants } = process.binding('pipe_wrap');
const { TTY } = process.binding('tty_wrap');
Expand Down
2 changes: 1 addition & 1 deletion src/process_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,4 @@ class ProcessWrap : public HandleWrap {
} // anonymous namespace
} // namespace node

NODE_BUILTIN_MODULE_CONTEXT_AWARE(process_wrap, node::ProcessWrap::Initialize)
NODE_MODULE_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize)
4 changes: 3 additions & 1 deletion test/parallel/test-process-wrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Flags: --expose-internals
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
Expand All @@ -22,7 +23,8 @@
'use strict';
require('../common');
const assert = require('assert');
const Process = process.binding('process_wrap').Process;
const { internalBinding } = require('internal/test/binding');
const Process = internalBinding('process_wrap').Process;
const { Pipe, constants: PipeConstants } = process.binding('pipe_wrap');
const pipe = new Pipe(PipeConstants.SOCKET);
const p = new Process();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-async-wrap-getasyncid.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
}

{
const Process = process.binding('process_wrap').Process;
const Process = internalBinding('process_wrap').Process;
testInitialized(new Process(), 'Process');
}

Expand Down

0 comments on commit 56cf058

Please sign in to comment.