diff --git a/lib/internal/v8_prof_processor.js b/lib/internal/v8_prof_processor.js index 0d9cfd6df4d12a..08c712f8be0daf 100644 --- a/lib/internal/v8_prof_processor.js +++ b/lib/internal/v8_prof_processor.js @@ -34,9 +34,9 @@ if (process.platform === 'darwin') { tickArguments.push('--windows'); } tickArguments.push.apply(tickArguments, process.argv.slice(1)); -script = `(function(require) { +script = `(function(module, require) { arguments = ${JSON.stringify(tickArguments)}; function write (s) { process.stdout.write(s) } ${script} })`; -vm.runInThisContext(script)(require); +vm.runInThisContext(script)(module, require);