diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 49dedc5fe2a847..3e3eaa5b60e17a 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -350,6 +350,7 @@ new SafeSet([ 'uv', 'http_parser', + 'process_wrap', 'v8', 'stream_wrap', 'signal_wrap', diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 4b321011ca454c..8aad6bcd6f8e07 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -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'); diff --git a/src/process_wrap.cc b/src/process_wrap.cc index b54e17f21192d8..e06afd84ffb7c8 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -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) diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js index b3cca47c463c19..5c91384453a469 100644 --- a/test/parallel/test-process-wrap.js +++ b/test/parallel/test-process-wrap.js @@ -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 @@ -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(); diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index 18a6ed839e55d9..65fe2015a0acd2 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -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'); }