Skip to content

Commit 513a895

Browse files
ofrobotsAli Sheikh
authored andcommitted
lib: wrap tick_processor scripts in IIFE
PR-URL: nodejs#4722 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
1 parent 0faed0b commit 513a895

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/internal/v8_prof_processor.js

Lines changed: 4 additions & 1 deletion
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)