0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

25091 Commits

Author SHA1 Message Date
ZYSzys
8828426af4 test: test internal/util/types in vm
PR-URL: https://github.com/nodejs/node/pull/25056
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-18 05:24:45 +01:00
Joyee Cheung
9190e4ecdf tools: make apilinks building more robust
1. Move the apilinks.json file into out/doc so it gets cleaned when
  running `make docclean`
2. When the apilinks.json generated is empty, throw a specific error
  so it's easier to understand what's wrong
3. Write to a file passed through CLI arguments instead writing to
  stdout in apilinks.js so the build process is more robust in
  the case of a bad binary

PR-URL: https://github.com/nodejs/node/pull/25019
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-18 05:14:24 +01:00
Rich Trott
3edc1c917b doc: revise "Breaking Changes" section of Collaborator Guide
Simplify material about TSC approval for breaking changes. Omit
extraneous material explaining that purely additive changes are not
breaking changes.

PR-URL: https://github.com/nodejs/node/pull/25071
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 18:49:27 -08:00
Joyee Cheung
19a9205645 process: move environment variable proxy code into node_env_var.cc
Instead of exposing all the NamedPropertyHandlerConfiguration()
parameters in node_internals, simply expose a CreateEnvVarProxy()
method that returns a Local<Value> that implements process.env,
and mark all the property handlers static in node_env_var.cc.
This makes the code more encapsulated.

PR-URL: https://github.com/nodejs/node/pull/25067
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 16:21:25 -08:00
Rich Trott
47ecf20603 test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: https://github.com/nodejs/node/issues/23089

PR-URL: https://github.com/nodejs/node/pull/24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-17 15:21:43 -08:00
Jon Moss
4b96a2a73b src: extract common Bind method
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of
functionality, so a common `Bind` was extracted to remove duplication.

PR-URL: https://github.com/nodejs/node/pull/22315
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2018-12-17 16:40:39 -05:00
cjihrig
928f776385 doc: add missing pr-url
PR-URL: https://github.com/nodejs/node/pull/25091
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-12-17 11:29:35 -08:00
Sam Roberts
19b59bfe17 tls: re-define max supported version as 1.2
Several secureProtocol strings allow any supported TLS version as the
maximum, but our maximum supported protocol version is TLSv1.2 even if
someone configures a build against an OpenSSL that supports TLSv1.3.

Fixes: https://github.com/nodejs/node/issues/24658

PR-URL: https://github.com/nodejs/node/pull/25024
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-17 09:00:27 -08:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments
above 50 characters.

PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 17:14:35 +01:00
Ruben Bridgewater
be3ae33936
console: add inspectOptions option
Add an `inspectOptions` option to the `console` constructor. That
way it's possible to define all inspection defaults for each
`console` instance instead of relying on the `inspect()` defaults.

PR-URL: https://github.com/nodejs/node/pull/24978
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-12-17 16:42:36 +01:00
Daniel Bevenius
a361b94b78 build: add a space to clarify skipping crypto msg
This commit adds a space to the message that is displayed for tests that
are skipped when node was built --without-ssl. For example, this is what
is currently displayed:
"release test-https-agent-additional-optionsSkipping as node was
compiled without crypto support"

After this change this will be:
"release test-https-agent-additional-options: Skipping as node was
compiled without crypto support"

PR-URL: https://github.com/nodejs/node/pull/25011
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-17 10:35:24 +01:00
Sam Roberts
b54d4a68e3 test: merge test with unnecessary child process
Test didn't require child process creation. While this test has not been
unstable, child process creation is slower and can be flaky in ci, so
test directly for the segfault regression.

PR-URL: https://github.com/nodejs/node/pull/25025
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-16 21:29:15 -08:00
Ruben Bridgewater
3439c955ab process: improve --redirect-warnings handling
1) Acquiring the file descriptor is not observable anymore when using
   the `--redirect-warnings` flag.
2) If `fs.appendFile` fails, the warning is now redirected to the
   default output.
3) The code is smaller and simpler.

PR-URL: https://github.com/nodejs/node/pull/24965
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 05:37:55 +01:00
cjihrig
707b0a8534 tools: enable no-useless-constructor lint rule
This commit enables ESLint's no-useless-constructor rule. Note
that the documentation examples that only include constructor
calls were left in tact.

PR-URL: https://github.com/nodejs/node/pull/25055
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-16 20:30:50 -08:00
Anna Henningsen
18f2bf7f9b src: mark some global state as const
Mark some global variables as `const` or `constexpr`.

PR-URL: https://github.com/nodejs/node/pull/25052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-16 20:21:45 -08:00
cjihrig
52ee55a06b vm: simplify Script constructor options validation
This commit combines two related if statements into an
if-else statement.

PR-URL: https://github.com/nodejs/node/pull/25054
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-16 20:14:56 -08:00
Anna Henningsen
8dfd757337
perf_hooks: make GC tracking state per-Environment
Otherwise this is global state that may be subject to race
conditions e.g. when running `perf_hooks` inside of Worker threads.

Tracking the GC type is removed entirely since the variable was unused.

PR-URL: https://github.com/nodejs/node/pull/25053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 02:29:10 +01:00
cjihrig
cc0e1770d9
doc: fix node.1 --http-parser sort order
For consistency with the API docs, switch the order of
--http-parser and --force-fips in node.1.

PR-URL: https://github.com/nodejs/node/pull/25045
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-16 10:56:14 -05:00
Eduard Bondarenko
20770073ba child_process: spawn ignores options in case args is undefined
spawn method ignores 3-d argument 'options' in case
the second one 'args' equals to 'undefined'.

Fixes: https://github.com/nodejs/node/issues/24912

PR-URL: https://github.com/nodejs/node/pull/24913
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-12-16 07:22:45 -08:00
Ruben Bridgewater
02b66b5b86
util: inspect all prototypes
It is currently difficult to distinguish multiple objects from each
other because the prototype is not properly inspected. From now on
all prototypes will be inspected, even if we do not fully know how
they will look like / what their shape really is.

PR-URL: https://github.com/nodejs/node/pull/24974
Fixes: https://github.com/nodejs/node/issues/24917
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-16 12:32:58 +01:00
Azard
5f4fa0756b doc: add EventTarget link to worker_threads
PR-URL: https://github.com/nodejs/node/pull/25058
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-12-16 12:15:26 +02:00
Sakthipriyan Vairamani (thefourtheye)
8f4b924f4a fs: make writeFile consistent with readFile wrt fd
As it is, `readFile` always reads from the current position of the file,
if a file descriptor is used. But `writeFile` always writes from the
beginning of the file.

This patch fixes this inconsistency by making `writeFile` also to write
from the current position of the file when used with a file descriptor.

PR-URL: https://github.com/nodejs/node/pull/23709
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-15 12:54:50 -08:00
wenjun ye
2c5dae5934
doc: make README formatting more consistent
In order to be consistent with the previous items,
I split the sentence.

PR-URL: https://github.com/nodejs/node/pull/25003
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-15 21:28:30 +01:00
Joyee Cheung
7a6bd9f9b7
src: pass isMainThread into bootstrap/node.js directly
Instead of loading the working binding for the sole purpose of
detecting whether we are inside the main thread unconditionally.

PR-URL: https://github.com/nodejs/node/pull/25017
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-15 21:22:10 +01:00
GauthamBanasandra
9021b0d3fc src: remove icuDataDir from node config
icuDataDir seems to be redundant as it is not used anywhere.
Hence removing it.

PR-URL: https://github.com/nodejs/node/pull/24780
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-12-15 09:43:03 -08:00
cjihrig
06134e3598
net: use strict comparisons for fd
This commit removes an eslint-disable comment, and moves file
descriptor checks to use strict equality. These checks were
using loose equality to support numeric and string file
descriptors. However, d9e95d8982
introduced strict validation, making the loose equality checks
redundant.

PR-URL: https://github.com/nodejs/node/pull/25014
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-15 12:16:42 -05:00
cjihrig
0fdd23fa3f
test: remove unnecessary linter comment
Some would say it's the linter's job to determine what
looks right.

PR-URL: https://github.com/nodejs/node/pull/25013
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-12-15 12:10:49 -05:00
cjihrig
715e3c6226
test: use global.gc() instead of gc()
This change is made for consistency, and to remove an
eslint-disable comment.

PR-URL: https://github.com/nodejs/node/pull/25012
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-15 12:06:57 -05:00
Ruben Bridgewater
1395256187 test: run eslint on test file and fix errors
This removes two entries from the eslint ignore file. One file does
not exist anymore and the other one could easily be fixed.

PR-URL: https://github.com/nodejs/node/pull/25009
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-15 06:55:02 -08:00
Ruben Bridgewater
83360899db test: remove dead code
This is not used by the test anymore.

PR-URL: https://github.com/nodejs/node/pull/25009
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-15 06:54:59 -08:00
Daniel Bevenius
e7c3a1b40a build: make lint-addon-docs run only if needed
Currently, the lint-addon-docs targets recipe will always be run.
This commit makes lint-addon-docs a phony target and adds a new
target named tools/.doclintstamp what will be an actual file,
similar to what the lint-cpp target does.

PR-URL: https://github.com/nodejs/node/pull/24993
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-15 06:48:07 -08:00
Anna Henningsen
c9a7088bd8 stream: re-use existing once() implementation
PR-URL: https://github.com/nodejs/node/pull/24991
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-12-15 06:43:38 -08:00
Anna Henningsen
ba4466e1b1 test: use blocks instead of async IIFE
Using an IIFE with async functions + await is equivalent
to using a block scope (aside from scoping effects
we don’t rely on), as far as I can tell.

PR-URL: https://github.com/nodejs/node/pull/24989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-12-15 06:41:10 -08:00
Anto Aravinth
0bf7d4149c test: adding history regression test case
PR-URL: https://github.com/nodejs/node/pull/24843
Refs: https://github.com/nodejs/node/issues/24385
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-14 21:53:25 -08:00
Ruben Bridgewater
885de1ba70 util: remove todo
Most people are going to use the existing option and switching the
name now comes with a cost which does not seem to justify the
improvement.

PR-URL: https://github.com/nodejs/node/pull/24982
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-14 21:32:51 -08:00
Joyee Cheung
b32e5e08b2 lib: remove internalBinding('config').pendingDeprecation
Instead use
`require('internal/options').getOptionValue('--pending-deprecation')`

PR-URL: https://github.com/nodejs/node/pull/24962
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-14 21:22:59 -08:00
Rich Trott
6a24014ee5 test: mark test-child-process-execfile flaky
Refs: https://github.com/nodejs/node/issues/25029

PR-URL: https://github.com/nodejs/node/pull/25051
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-14 20:10:11 -08:00
Rich Trott
bcf39019a7 test: mark test-child-process-exit-code flaky
Refs: # https://github.com/nodejs/node/issues/25033

PR-URL: https://github.com/nodejs/node/pull/25050
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-12-14 19:20:59 -08:00
Joyee Cheung
b5202546fc test: improve WPT runner name matching
This patch:

- Support wildcards(*) in WPT runner name matching (needed by e.g.
  encoding where all the tests requires i18n support in the build)
- Print failure reasons when encountering an expected failure
- Fix a bug in copyGlobalsFromObject (previously it copies
  properties from `global` instead of the given `obj`)

Previously an expected failure is printed as

```
[EXPECTED_FAILURE] response.formData() with input: %61+%4d%4D=
```

Now it is printed as

```
[EXPECTED_FAILURE] response.formData() with input: %61+%4d%4D=
missing Request and Response
```

PR-URL: https://github.com/nodejs/node/pull/24826
Refs: https://github.com/nodejs/node/issues/24823
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-12-14 18:04:46 -08:00
Joyee Cheung
a96ba1c8b6 test: remove reference to whatwg in file names under test/wpt
WPT covers standards in both W3C and WHATWG, as such it would be
strange to make this disparity explicit in our file names
(e.g. when testing standards that are solely in W3C, like
performance-timeline). Remove the reference to WHATWG will
also make the file names shorter.

PR-URL: https://github.com/nodejs/node/pull/24826
Refs: https://github.com/nodejs/node/issues/24823
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-12-14 18:04:43 -08:00
Rich Trott
87006be62a test: mark test-worker-memory flaky on Windows CI
Refs: https://github.com/nodejs/node/issues/23277

PR-URL: https://github.com/nodejs/node/pull/25042
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-12-14 13:17:58 -08:00
cjihrig
8ac6c058f9
url: remove an eslint-disable comment
Remove an eslint-disable comment by using a strict comparison
instead of a Boolean cast.

PR-URL: https://github.com/nodejs/node/pull/24995
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2018-12-14 13:13:54 -05:00
cjihrig
034ec648ca
querystring: remove eslint-disable
Remove the eslint-disable comments by using a strict comparison
instead of a Boolean cast.

PR-URL: https://github.com/nodejs/node/pull/24995
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2018-12-14 13:13:43 -05:00
Mikko Rantanen
37a5e01bda lib: ensure readable stream flows to end
If a readable stream was set up with `highWaterMark 0`, the while-loop
in `maybeReadMore_` function would never execute.

The while loop now has an extra or-condition for the case where the
stream is flowing and there are no items. The or-condition is adapted
from the emit-condition of the `addChunk` function.

The `addChunk` also contains a check for `state.sync`. However that part
of the check was omitted here because the `maybeReadMore_` is executed
using `process.nextTick`. `state.sync` is set and then unset  within the
`read()` function so it should never be in effect in `maybeReadMore_`.

Fixes: https://github.com/nodejs/node/issues/24915

PR-URL: https://github.com/nodejs/node/pull/24918
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-12-14 09:23:56 -08:00
Rich Trott
adf5083647 test: mark test-cli-node-options flaky on arm
Refs: https://github.com/nodejs/node/issues/25028

PR-URL: https://github.com/nodejs/node/pull/25032
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-12-14 09:21:20 -08:00
Ruben Bridgewater
9752fce34d
util: improve format performance
This simplifies the `format()` code and significantly improves the
performance.

PR-URL: https://github.com/nodejs/node/pull/24981
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-12-14 18:13:40 +01:00
Rich Trott
d0c240f1be test: mark test-child-process-execsync flaky on AIX
Refs: https://github.com/nodejs/node/issues/24921

PR-URL: https://github.com/nodejs/node/pull/25031
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-14 08:00:10 -08:00
Rich Trott
914c49497c test: increase error information in test-cli-syntax-*
If there is an error, but not the error code the test expects, display
more information about the error.

PR-URL: https://github.com/nodejs/node/pull/25021
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-12-14 06:41:19 -08:00
Ruben Bridgewater
80ab537ee6 process: properly close file descriptor on exit
This makes sure the file descriptor is closed syncronously on exit
instead of using the asyncronous version which should not be used
on exit.

PR-URL: https://github.com/nodejs/node/pull/24972
Refs: https://github.com/nodejs/node/pull/24965/files#r240770314
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-13 23:08:44 -08:00
Kelvin Jin
49f1db47e2 src: emit 'params' instead of 'data' for NodeTracing.dataCollected
PR-URL: https://github.com/nodejs/node/pull/24949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-13 20:48:45 -08:00