File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/internal/child_process Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 33const {
44 JSONParse,
55 JSONStringify,
6+ StringPrototypeSplit,
67 Symbol,
8+ TypedArrayPrototypeSubarray,
79} = primordials ;
810const { Buffer } = require ( 'buffer' ) ;
911const { StringDecoder } = require ( 'string_decoder' ) ;
@@ -63,8 +65,8 @@ const advanced = {
6365 }
6466
6567 const deserializer = new ChildProcessDeserializer (
66- messageBuffer . subarray ( 4 , 4 + size ) ) ;
67- messageBuffer = messageBuffer . subarray ( 4 + size ) ;
68+ TypedArrayPrototypeSubarray ( messageBuffer , 4 , 4 + size ) ) ;
69+ messageBuffer = TypedArrayPrototypeSubarray ( messageBuffer , 4 + size ) ;
6870
6971 deserializer . readHeader ( ) ;
7072 yield deserializer . readValue ( ) ;
@@ -98,7 +100,8 @@ const json = {
98100
99101 if ( channel [ kStringDecoder ] === undefined )
100102 channel [ kStringDecoder ] = new StringDecoder ( 'utf8' ) ;
101- const chunks = channel [ kStringDecoder ] . write ( readData ) . split ( '\n' ) ;
103+ const chunks =
104+ StringPrototypeSplit ( channel [ kStringDecoder ] . write ( readData ) , '\n' ) ;
102105 const numCompleteChunks = chunks . length - 1 ;
103106 // Last line does not have trailing linebreak
104107 const incompleteChunk = chunks [ numCompleteChunks ] ;
You can’t perform that action at this time.
0 commit comments