From de82d9741beee2e2180ff61dbe11df0514653400 Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Mon, 2 Jan 2017 01:20:25 +0900 Subject: [PATCH] child_process: get rid of another forEach() in IPC --- lib/internal/child_process.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index e446f0430eaace..3017cd5889a037 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -498,9 +498,10 @@ function setupChannel(target, channel) { var queue = target._handleQueue; target._handleQueue = null; - queue.forEach(function(args) { + for (var i = 0; i < queue.length; i++) { + var args = queue[i]; target._send(args.message, args.handle, args.options, args.callback); - }); + } // Process a pending disconnect (if any). if (!target.connected && target.channel && !target._handleQueue)