From 9821c2f7ba0e48289d36b2191b135f5104b37031 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 24 Apr 2017 02:21:01 -0400 Subject: [PATCH] process: fix permanent deoptimizations PR-URL: https://github.com/nodejs/node/pull/12456 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell --- lib/internal/process/stdio.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js index cf69657e40583e..9734159c6c4459 100644 --- a/lib/internal/process/stdio.js +++ b/lib/internal/process/stdio.js @@ -39,7 +39,7 @@ function setupStdio() { switch (tty_wrap.guessHandleType(fd)) { case 'TTY': - const tty = require('tty'); + var tty = require('tty'); stdin = new tty.ReadStream(fd, { highWaterMark: 0, readable: true, @@ -48,13 +48,13 @@ function setupStdio() { break; case 'FILE': - const fs = require('fs'); + var fs = require('fs'); stdin = new fs.ReadStream(null, { fd: fd, autoClose: false }); break; case 'PIPE': case 'TCP': - const net = require('net'); + var net = require('net'); // It could be that process has been started with an IPC channel // sitting on fd=0, in such case the pipe for this fd is already @@ -139,20 +139,20 @@ function createWritableStdioStream(fd) { switch (tty_wrap.guessHandleType(fd)) { case 'TTY': - const tty = require('tty'); + var tty = require('tty'); stream = new tty.WriteStream(fd); stream._type = 'tty'; break; case 'FILE': - const fs = require('internal/fs'); + var fs = require('internal/fs'); stream = new fs.SyncWriteStream(fd, { autoClose: false }); stream._type = 'fs'; break; case 'PIPE': case 'TCP': - const net = require('net'); + var net = require('net'); stream = new net.Socket({ fd: fd, readable: false,