Browse Source

lib: wrap tick_processor scripts in IIFE

PR-URL: https://github.com/nodejs/node/pull/4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
process-exit-stdio-flushing
Ali Ijaz Sheikh 9 years ago
committed by Ali Sheikh
parent
commit
953173b0d7
  1. 5
      lib/internal/v8_prof_processor.js

5
lib/internal/v8_prof_processor.js

@ -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);

Loading…
Cancel
Save