@@ -176,7 +176,7 @@ const handleConversion = {
176176 // waiting for the NODE_HANDLE_ACK of the current passing handle.
177177 assert ( ! target . _pendingMessage ) ;
178178 target . _pendingMessage =
179- { callback, message, handle, options, retransmissions : 0 } ;
179+ { callback, message, handle, options, retransmissions : 0 } ;
180180 } else {
181181 handle . close ( ) ;
182182 }
@@ -335,8 +335,8 @@ function flushStdio(subprocess) {
335335function createSocket ( pipe , readable , watchPeerClose ) {
336336 const sock = net . Socket ( { handle : pipe , readable } ) ;
337337 if ( watchPeerClose &&
338- process . platform !== 'win32' &&
339- typeof pipe ?. watchPeerClose === 'function' ) {
338+ process . platform !== 'win32' &&
339+ typeof pipe ?. watchPeerClose === 'function' ) {
340340 pipe . watchPeerClose ( true , ( ) => sock . destroy ( ) ) ;
341341 sock . once ( 'close' , ( ) => pipe . watchPeerClose ( false ) ) ;
342342 }
@@ -375,7 +375,7 @@ ChildProcess.prototype.spawn = function spawn(options) {
375375
376376
377377 validateOneOf ( options . serialization , 'options.serialization' ,
378- [ undefined , 'json' , 'advanced' ] ) ;
378+ [ undefined , 'json' , 'advanced' ] ) ;
379379 const serialization = options . serialization || 'json' ;
380380
381381 if ( ipc !== undefined ) {
@@ -387,7 +387,7 @@ ChildProcess.prototype.spawn = function spawn(options) {
387387
388388 ArrayPrototypePush ( options . envPairs , `NODE_CHANNEL_FD=${ ipcFd } ` ) ;
389389 ArrayPrototypePush ( options . envPairs ,
390- `NODE_CHANNEL_SERIALIZATION_MODE=${ serialization } ` ) ;
390+ `NODE_CHANNEL_SERIALIZATION_MODE=${ serialization } ` ) ;
391391 }
392392
393393 validateString ( options . file , 'options.file' ) ;
@@ -408,10 +408,10 @@ ChildProcess.prototype.spawn = function spawn(options) {
408408
409409 // Run-time errors should emit an error, not throw an exception.
410410 if ( err === UV_EACCES ||
411- err === UV_EAGAIN ||
412- err === UV_EMFILE ||
413- err === UV_ENFILE ||
414- err === UV_ENOENT ) {
411+ err === UV_EAGAIN ||
412+ err === UV_EMFILE ||
413+ err === UV_ENFILE ||
414+ err === UV_ENOENT ) {
415415 if ( childProcessSpawn . hasSubscribers ) {
416416 childProcessSpawn . error . publish ( {
417417 process : this ,
@@ -501,7 +501,7 @@ ChildProcess.prototype.spawn = function spawn(options) {
501501
502502 for ( i = 0 ; i < stdio . length ; i ++ )
503503 ArrayPrototypePush ( this . stdio ,
504- stdio [ i ] . socket === undefined ? null : stdio [ i ] . socket ) ;
504+ stdio [ i ] . socket === undefined ? null : stdio [ i ] . socket ) ;
505505
506506 // Add .send() method and start listening for IPC data
507507 if ( ipc !== undefined ) setupChannel ( this , ipc , serialization ) ;
@@ -667,16 +667,16 @@ function setupChannel(target, channel, serializationMode) {
667667 target . on ( 'internalMessage' , function ( message , handle ) {
668668 // Once acknowledged - continue sending handles.
669669 if ( message . cmd === 'NODE_HANDLE_ACK' ||
670- message . cmd === 'NODE_HANDLE_NACK' ) {
670+ message . cmd === 'NODE_HANDLE_NACK' ) {
671671
672672 if ( target . _pendingMessage ) {
673673 if ( message . cmd === 'NODE_HANDLE_ACK' ) {
674674 closePendingHandle ( target ) ;
675675 } else if ( target . _pendingMessage . retransmissions ++ ===
676- MAX_HANDLE_RETRANSMISSIONS ) {
676+ MAX_HANDLE_RETRANSMISSIONS ) {
677677 closePendingHandle ( target ) ;
678678 process . emitWarning ( 'Handle did not reach the receiving process ' +
679- 'correctly' , 'SentHandleNotReceivedWarning' ) ;
679+ 'correctly' , 'SentHandleNotReceivedWarning' ) ;
680680 }
681681 }
682682
@@ -686,9 +686,9 @@ function setupChannel(target, channel, serializationMode) {
686686
687687 if ( target . _pendingMessage ) {
688688 target . _send ( target . _pendingMessage . message ,
689- target . _pendingMessage . handle ,
690- target . _pendingMessage . options ,
691- target . _pendingMessage . callback ) ;
689+ target . _pendingMessage . handle ,
690+ target . _pendingMessage . options ,
691+ target . _pendingMessage . callback ) ;
692692 }
693693
694694 for ( let i = 0 ; i < queue . length ; i ++ ) {
@@ -785,9 +785,9 @@ function setupChannel(target, channel, serializationMode) {
785785 // will result in error message that is weakly consumable.
786786 // So perform a final check on message prior to sending.
787787 if ( typeof message !== 'string' &&
788- typeof message !== 'object' &&
789- typeof message !== 'number' &&
790- typeof message !== 'boolean' ) {
788+ typeof message !== 'object' &&
789+ typeof message !== 'number' &&
790+ typeof message !== 'boolean' ) {
791791 throw new ERR_INVALID_ARG_TYPE (
792792 'message' , [ 'string' , 'object' , 'number' , 'boolean' ] , message ) ;
793793 }
@@ -848,8 +848,8 @@ function setupChannel(target, channel, serializationMode) {
848848 handle . setSimultaneousAccepts ( true ) ;
849849 }
850850 } else if ( this . _handleQueue &&
851- ! ( message && ( message . cmd === 'NODE_HANDLE_ACK' ||
852- message . cmd === 'NODE_HANDLE_NACK' ) ) ) {
851+ ! ( message && ( message . cmd === 'NODE_HANDLE_ACK' ||
852+ message . cmd === 'NODE_HANDLE_NACK' ) ) ) {
853853 // Queue request anyway to avoid out-of-order messages.
854854 ArrayPrototypePush ( this . _handleQueue , {
855855 callback : callback ,
@@ -986,11 +986,11 @@ function setupChannel(target, channel, serializationMode) {
986986const INTERNAL_PREFIX = 'NODE_' ;
987987function isInternal ( message ) {
988988 return ( message !== null &&
989- typeof message === 'object' &&
990- typeof message . cmd === 'string' &&
991- message . cmd . length > INTERNAL_PREFIX . length &&
992- StringPrototypeSlice ( message . cmd , 0 , INTERNAL_PREFIX . length ) ===
993- INTERNAL_PREFIX ) ;
989+ typeof message === 'object' &&
990+ typeof message . cmd === 'string' &&
991+ message . cmd . length > INTERNAL_PREFIX . length &&
992+ StringPrototypeSlice ( message . cmd , 0 , INTERNAL_PREFIX . length ) ===
993+ INTERNAL_PREFIX ) ;
994994}
995995
996996const nop = FunctionPrototype ;
@@ -1028,7 +1028,7 @@ function getValidStdio(stdio, sync) {
10281028 if ( stdio === 'ignore' ) {
10291029 ArrayPrototypePush ( acc , { type : 'ignore' } ) ;
10301030 } else if ( stdio === 'pipe' || stdio === 'overlapped' ||
1031- ( typeof stdio === 'number' && stdio < 0 ) ) {
1031+ ( typeof stdio === 'number' && stdio < 0 ) ) {
10321032 const a = {
10331033 type : stdio === 'overlapped' ? 'overlapped' : 'pipe' ,
10341034 readable : i === 0 ,
@@ -1068,7 +1068,7 @@ function getValidStdio(stdio, sync) {
10681068 fd : typeof stdio === 'number' ? stdio : stdio . fd ,
10691069 } ) ;
10701070 } else if ( getHandleWrapType ( stdio ) || getHandleWrapType ( stdio . handle ) ||
1071- getHandleWrapType ( stdio . _handle ) ) {
1071+ getHandleWrapType ( stdio . _handle ) ) {
10721072 const handle = getHandleWrapType ( stdio ) ?
10731073 stdio :
10741074 getHandleWrapType ( stdio . handle ) ? stdio . handle : stdio . _handle ;
0 commit comments