diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-02-28 17:23:08 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-03-05 12:16:18 +0300 |
commit | b24d65dcdc74074304405522a190daf782048133 (patch) | |
tree | e7e5e454658f1a06021ac5ac2a8a89b6d215f0f4 /lib/internal/v8_prof_processor.js | |
parent | a8b5192fefe54b140ae923e749104b49c5d3be49 (diff) |
lib: re-fix v8_prof_processor
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: https://github.com/nodejs/node/pull/19059
Fixes: https://github.com/nodejs/node/issues/19044
Refs: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'lib/internal/v8_prof_processor.js')
-rw-r--r-- | lib/internal/v8_prof_processor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/v8_prof_processor.js b/lib/internal/v8_prof_processor.js index 0d9cfd6df4d..08c712f8be0 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); |