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

Remove deprecated function #6977

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 8 additions & 8 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ function masterInit() {
execArgv: process.execArgv,
silent: false
};
settings = util._extend(settings, cluster.settings);
settings = util._extend(settings, options || {});
settings = Object.assign(settings, cluster.settings);
settings = Object.assign(settings, options || {});
// Tell V8 to write profile data for each process to a separate file.
// Without --logfile=v8-%p.log, everything ends up in a single, unusable
// file. (Unusable because what V8 logs are memory addresses and each
Expand Down Expand Up @@ -297,10 +297,10 @@ function masterInit() {
var debugPortOffset = 1;

function createWorkerProcess(id, env) {
var workerEnv = util._extend({}, process.env);
var workerEnv = Object.assign({}, process.env);
var execArgv = cluster.settings.execArgv.slice();

workerEnv = util._extend(workerEnv, env);
workerEnv = Object.assign(workerEnv, env);
workerEnv.NODE_UNIQUE_ID = '' + id;

for (var i = 0; i < execArgv.length; i++) {
Expand Down Expand Up @@ -495,7 +495,7 @@ function masterInit() {

// Set custom server data
handle.add(worker, function(errno, reply, handle) {
reply = util._extend({
reply = Object.assign({
errno: errno,
key: key,
ack: message.seq,
Expand Down Expand Up @@ -573,7 +573,7 @@ function workerInit() {
else
indexes[key]++;

const message = util._extend({
const message = Object.assign({
act: 'queryServer',
index: indexes[key],
data: null
Expand Down Expand Up @@ -640,7 +640,7 @@ function workerInit() {
}

function getsockname(out) {
if (key) util._extend(out, message.sockname);
if (key) Object.assign(out, message.sockname);
return 0;
}

Expand Down Expand Up @@ -735,7 +735,7 @@ var seq = 0;
var callbacks = {};
function sendHelper(proc, message, handle, cb) {
// Mark message as internal. See INTERNAL_PREFIX in lib/child_process.js
message = util._extend({ cmd: 'NODE_CLUSTER' }, message);
message = Object.assign({ cmd: 'NODE_CLUSTER' }, message);
if (cb) callbacks[seq] = cb;
message.seq = seq;
seq += 1;
Expand Down