@@ -17,9 +17,9 @@ if (isCPPSymbolsNotMapped) {
17
17
18
18
19
19
const assert = require ( 'assert' ) ;
20
- const cp = require ( 'child_process' ) ;
20
+ const { spawn , spawnSync } = require ( 'child_process' ) ;
21
21
const path = require ( 'path' ) ;
22
- const fs = require ( 'fs' ) ;
22
+ const { writeFileSync } = require ( 'fs' ) ;
23
23
24
24
const LOG_FILE = path . join ( tmpdir . path , 'tick-processor.log' ) ;
25
25
const RETRY_TIMEOUT = 150 ;
@@ -33,7 +33,7 @@ const code = `function f() {
33
33
};
34
34
f();` ;
35
35
36
- const proc = cp . spawn ( process . execPath , [
36
+ const proc = spawn ( process . execPath , [
37
37
'--no_logfile_per_isolate' ,
38
38
'--logfile=-' ,
39
39
'--prof' ,
@@ -49,8 +49,8 @@ proc.stdout.on('data', (chunk) => ticks += chunk);
49
49
function runPolyfill ( content ) {
50
50
proc . kill ( ) ;
51
51
content += BROKEN_PART ;
52
- fs . writeFileSync ( LOG_FILE , content ) ;
53
- const child = cp . spawnSync (
52
+ writeFileSync ( LOG_FILE , content ) ;
53
+ const child = spawnSync (
54
54
`${ process . execPath } ` ,
55
55
[
56
56
'--prof-process' , LOG_FILE
0 commit comments