Skip to content

Commit

Permalink
lib: re-fix v8_prof_processor
Browse files Browse the repository at this point in the history
Make the script not error out immediately because of a missing
pseudo-global.
(Note that it seems like tests are still broken on `master`.)

PR-URL: #19059
Fixes: #19044
Refs: #18623
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax authored and rvagg committed Aug 16, 2018
1 parent 2702fd7 commit 29b5d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/v8_prof_processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,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);

0 comments on commit 29b5d39

Please sign in to comment.