Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1c3f81d
win,msi: install tools for native modules
joaocgreis Aug 29, 2018
05ace78
doc: `node debug` → `node inspect` in CLI docs
addaleax Sep 9, 2018
94e67b6
tools: fix doc tool behavior for version arrays
tniessen Sep 8, 2018
779e072
fs: implement mkdir recursive (mkdirp)
Aug 9, 2018
b1be08f
test: add comment describing test-fs-mkdir
Aug 21, 2018
75c288e
url: provide pathToFileURL and fileURLToPath
guybedford Aug 24, 2018
42e6ce2
test: check parameter type of fs.mkdir()
Aug 30, 2018
cf61a04
test: refactor structure of common/index
jasnell Aug 24, 2018
108a169
assert: align argument names
BridgeAR Sep 8, 2018
09ae073
doc: add history for withFileTypes in fs.readdir[Sync]()
tiendq Sep 10, 2018
8b6a161
crypto: fix public key encryption internals
tniessen Sep 9, 2018
b87ab0f
crypto: rename symbols to match guidelines
tniessen Sep 5, 2018
b9fd99e
doc: add gabrielschulhof to TSC
Trott Sep 12, 2018
8153c10
n-api: add generic finalizer callback
Aug 10, 2018
2b3b205
test: checks on napi factory wrap’s finalization
legendecas Aug 31, 2018
f41911f
lib: remove unnecessary symbols
Aug 22, 2018
01a5c7d
test: minor refactor in common/index.js
jasnell Sep 6, 2018
353cb4e
doc: document http2 timeouts
sagitsofan Sep 10, 2018
a214769
doc: add reference to guide for N-API additions
mhdawson Aug 29, 2018
e85c814
deps: cherry-pick 2363cdf from upstream V8
ofrobots Sep 11, 2018
92b695e
trace_events: avoid flusing uninitialized traces
ofrobots Sep 12, 2018
4159000
fs: ensure readdir() callback is only called once
cjihrig Sep 10, 2018
d853a3f
lib: simplify 'processChunkSync'
Sep 11, 2018
535c30c
module: add createRequireFunction method
devsnek Mar 14, 2018
ec6afb9
worker: correct (de)initialization order
addaleax Sep 9, 2018
c9f2283
tools: implement update-authors in JS
addaleax Sep 9, 2018
c898071
doc: update AUTHORS list
addaleax Sep 9, 2018
878d616
src: move getActiveResources/Handles to node_process.cc
jasnell Sep 7, 2018
27b0cb5
src: move DebugPortGetter/Setter to node_process.cc
jasnell Sep 7, 2018
4ba80b1
doc: fix typo in dns docs
MohammedEssehemy Sep 14, 2018
da86003
doc: add withFileTypes option to fsPromises.readdir
bengl Sep 13, 2018
1e07002
process: generate list of allowed env flags programmatically
addaleax Aug 31, 2018
a793163
lib: generate allowedNodeEnvironmentFlags lazily
addaleax Aug 31, 2018
81fd5d2
doc: add full deprecation history
tniessen Sep 8, 2018
479e1ec
fs: fix promisified fs.readdir withFileTypes
apapirovski Sep 13, 2018
f2ae0cb
src: fix `--prof-process` CLI argument handling
addaleax Sep 10, 2018
9441282
tracing: remove shutdown-on-signal
addaleax Sep 6, 2018
14c491c
path: remove unnecessary if statement
wchargin Aug 11, 2018
7c5e0d8
tools: update ESLint to 5.6.0
Trott Sep 16, 2018
3b763cd
src: move no_async_hooks_checks to env
danbev Sep 10, 2018
182ec37
[v10.x backport] backport d48bd16 from v8 master
Sep 17, 2018
9164ccf
update patch level
Sep 17, 2018
d0166ea
Revert "update patch level"
Sep 17, 2018
ce43fb1
update embedder string
Sep 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: fix --prof-process CLI argument handling
Make sure that options after `--prof-process` are not treated
as Node.js options.

Fixes: #22786

PR-URL: #22790
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
addaleax authored and targos committed Sep 16, 2018
commit f2ae0cb2554f0502873a4792aa2f3210fbf4e35c
4 changes: 3 additions & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,11 @@
for (const [ from, expansion ] of aliases) {
let isAccepted = true;
for (const to of expansion) {
if (!to.startsWith('-')) continue;
if (!to.startsWith('-') || to === '--') continue;
const recursiveExpansion = aliases.get(to);
if (recursiveExpansion) {
if (recursiveExpansion[0] === to)
recursiveExpansion.splice(0, 1);
expansion.push(...recursiveExpansion);
continue;
}
Expand Down
2 changes: 2 additions & 0 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
AddOption("--prof-process",
"process V8 profiler output generated using --prof",
&EnvironmentOptions::prof_process);
// Options after --prof-process are passed through to the prof processor.
AddAlias("--prof-process", { "--prof-process", "--" });
AddOption("--redirect-warnings",
"write warnings to file instead of stderr",
&EnvironmentOptions::redirect_warnings,
Expand Down
34 changes: 34 additions & 0 deletions test/parallel/test-tick-processor-arguments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
'use strict';
const common = require('../common');
const tmpdir = require('../common/tmpdir');
const fs = require('fs');
const assert = require('assert');
const { spawnSync } = require('child_process');

if (!common.isMainThread)
common.skip('chdir not available in workers');
if (!common.enoughTestMem)
common.skip('skipped due to memory requirements');
if (common.isAIX)
common.skip('does not work on AIX');

tmpdir.refresh();
process.chdir(tmpdir.path);

// Generate log file.
spawnSync(process.execPath, [ '--prof', '-p', '42' ]);

const logfile = fs.readdirSync('.').filter((name) => name.endsWith('.log'))[0];
assert(logfile);

// Make sure that the --preprocess argument is passed through correctly,
// as an example flag listed in deps/v8/tools/tickprocessor.js.
// Any of the other flags there should work for this test too, if --preprocess
// is ever removed.
const { stdout } = spawnSync(
process.execPath,
[ '--prof-process', '--preprocess', logfile ],
{ encoding: 'utf8' });

// Make sure that the result is valid JSON.
JSON.parse(stdout);