diff --git a/lib/child_process.js b/lib/child_process.js index aadac2ed288..23963828c0c 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -454,7 +454,8 @@ function setupChannel(target, channel) { var obj = handleConversion[message.type]; // convert TCP object to native handle object - handle = handleConversion[message.type].send.apply(target, arguments); + handle = + handleConversion[message.type].send.call(target, message, handle); // If handle was sent twice, or it is impossible to get native handle // out of it - just send a text without the handle. diff --git a/lib/cluster.js b/lib/cluster.js index 0914546b9ee..c994f433b96 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -662,6 +662,8 @@ function sendHelper(proc, message, handle, cb) { // to the callback but intercepts and redirects ACK messages. function internal(worker, cb) { return function(message, handle) { + 'use strict'; + if (message.cmd !== 'NODE_CLUSTER') return; var fn = cb; if (!util.isUndefined(message.ack)) { diff --git a/lib/net.js b/lib/net.js index c2f320d75ad..ddace957b42 100644 --- a/lib/net.js +++ b/lib/net.js @@ -604,9 +604,10 @@ Socket.prototype.__defineGetter__('localPort', function() { Socket.prototype.write = function(chunk, encoding, cb) { + 'use strict'; if (!util.isString(chunk) && !util.isBuffer(chunk)) throw new TypeError('invalid data'); - return stream.Duplex.prototype.write.call(this, chunk, encoding, cb); + return stream.Duplex.prototype.write.apply(this, arguments); };