summaryrefslogtreecommitdiff
path: root/lib/cluster.js
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2014-09-03 14:24:50 -0700
committerTrevor Norris <trev.norris@gmail.com>2014-09-03 14:24:50 -0700
commit9b8837b3554cb38fe9412922f064529329f5fff7 (patch)
treef72efa93917d9a86d07e3f9c8c5ef339ff291eec /lib/cluster.js
parent73631bbcc83888ec61a0aebf4eff3904e9384a2e (diff)
downloadnode-new-9b8837b3554cb38fe9412922f064529329f5fff7.tar.gz
src: be more intelligent about use of "arguments"
Use 'use strict' when there are named arguments and the arguments object is passed to apply(). Also pass named arguments to call() when the named argument is modified by the function. Suggested in https://github.com/joyent/node/pull/8302#issuecomment-54331801 Confirmed in https://github.com/joyent/node/pull/8302#issuecomment-54364818 Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/cluster.js')
-rw-r--r--lib/cluster.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/cluster.js b/lib/cluster.js
index 0914546b9e..c994f433b9 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)) {