Skip to content

Commit 953173b

Browse files
ofrobotsAli Sheikh
authored and
Ali Sheikh
committed
lib: wrap tick_processor scripts in IIFE
PR-URL: #4722 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 01f82f0 commit 953173b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/internal/v8_prof_processor.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ if (process.platform === 'darwin') {
2525
tickArguments.push('--windows');
2626
}
2727
tickArguments.push.apply(tickArguments, process.argv.slice(1));
28-
script = 'arguments = ' + JSON.stringify(tickArguments) + ';\n' + script;
28+
script = `(function() {
29+
arguments = ${JSON.stringify(tickArguments)};
30+
${script}
31+
})()`;
2932
eval(script);

0 commit comments

Comments
 (0)