@@ -17,9 +17,9 @@ if (isCPPSymbolsNotMapped) {
1717
1818
1919const assert = require ( 'assert' ) ;
20- const cp = require ( 'child_process' ) ;
20+ const { spawn , spawnSync } = require ( 'child_process' ) ;
2121const path = require ( 'path' ) ;
22- const fs = require ( 'fs' ) ;
22+ const { writeFileSync } = require ( 'fs' ) ;
2323
2424const LOG_FILE = path . join ( tmpdir . path , 'tick-processor.log' ) ;
2525const RETRY_TIMEOUT = 150 ;
@@ -33,7 +33,7 @@ const code = `function f() {
3333 };
3434 f();` ;
3535
36- const proc = cp . spawn ( process . execPath , [
36+ const proc = spawn ( process . execPath , [
3737 '--no_logfile_per_isolate' ,
3838 '--logfile=-' ,
3939 '--prof' ,
@@ -49,8 +49,8 @@ proc.stdout.on('data', (chunk) => ticks += chunk);
4949function runPolyfill ( content ) {
5050 proc . kill ( ) ;
5151 content += BROKEN_PART ;
52- fs . writeFileSync ( LOG_FILE , content ) ;
53- const child = cp . spawnSync (
52+ writeFileSync ( LOG_FILE , content ) ;
53+ const child = spawnSync (
5454 `${ process . execPath } ` ,
5555 [
5656 '--prof-process' , LOG_FILE
0 commit comments