0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00

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>
This commit is contained in:
Ali Ijaz Sheikh 2016-01-24 09:32:14 -08:00 committed by Ali Sheikh
parent 01f82f0685
commit 953173b0d7

View File

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