Skip to content

Commit

Permalink
lib: wrap tick_processor scripts in IIFE
Browse files Browse the repository at this point in the history
PR-URL: #4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
  • Loading branch information
ofrobots authored and Ali Sheikh committed Mar 4, 2016
1 parent 01f82f0 commit 953173b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internal/v8_prof_processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ if (process.platform === 'darwin') {
tickArguments.push('--windows');
}
tickArguments.push.apply(tickArguments, process.argv.slice(1));
script = 'arguments = ' + JSON.stringify(tickArguments) + ';\n' + script;
script = `(function() {
arguments = ${JSON.stringify(tickArguments)};
${script}
})()`;
eval(script);

0 comments on commit 953173b

Please sign in to comment.