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

22833 Commits

Author SHA1 Message Date
Timothy Gu
6396574cde
crypto: remove outdated comment
PR-URL: https://github.com/nodejs/node/pull/21511
Fixes: https://github.com/nodejs/node/issues/21488
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-24 18:02:10 -04:00
Vse Mozhet Byt
28100bbe6d doc: fix sort in sections, lists, tables of dns.md
`dns.resolveAny()`, `dnsPromises.resolveAny()`,
`dns.setServers()`, `dnsPromises.setServers()`
were out of ABC order in some places.

PR-URL: https://github.com/nodejs/node/pull/21505
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-24 23:49:45 +03:00
Thomas Watson
e22d70924b
doc: show options arg to new Worker is optional
PR-URL: https://github.com/nodejs/node/pull/21508
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-24 21:08:39 +02:00
Robert Nagy
8ab7ea6eed doc: fix HTTP req/res 'close' description
PR-URL: https://github.com/nodejs/node/pull/21047
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 09:47:27 -07:00
cjihrig
7a3bbbf41b
tools: update ESLint to 5.0.0
This is a new major release of ESLint.

PR-URL: https://github.com/nodejs/node/pull/20855
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-24 12:43:54 -04:00
cjihrig
d5316bc27d
test: lint fixes for ESLint update
This commit introduces changes required for the ESLint 5 update.

PR-URL: https://github.com/nodejs/node/pull/20855
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-24 12:43:42 -04:00
Rich Trott
1ee4703974
test: move net bytes-per-chunk test to sequential
The test is timing out on FreeBSD 10 in CI. It takes less than half as
long to run when it is in sequential on that platform instead of
parallel.

Refs: https://github.com/nodejs/node/pull/21322#issuecomment-399311718

PR-URL: https://github.com/nodejs/node/pull/21457
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 15:55:27 +02:00
Renée Kooi
686cb4dbd0
util: fix comment typos
When the deep(Strict)Equal comparison functions were moved to an
internal module, a variable named `current` was replaced with `val1`.
That accidentally also replaced a few "currently"s in comments.

Refs: https://github.com/nodejs/node/pull/16084

PR-URL: https://github.com/nodejs/node/pull/21436
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-24 15:45:30 +02:00
Tobias Nießen
193d6d1bda
doc: update notes about GCM decryption
Given that https://github.com/nodejs/node/pull/17825 and
https://github.com/nodejs/node/pull/20039 have landed on master, this
statement is no longer true.

PR-URL: https://github.com/nodejs/node/pull/21445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-24 15:43:22 +02:00
Fernando Doglio
fd520e7b43
test: remove string error from strictEqual
Removes the string error from the assertion call to improve the error
message shown on screen when the test fails.

PR-URL: https://github.com/nodejs/node/pull/21292
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-24 15:35:21 +02:00
ZaneHannanAU
c041fd2dc7 doc: correct parameters, return types in crypto.md
PR-URL: https://github.com/nodejs/node/pull/21420
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 15:59:08 +03:00
Сковорода Никита Андреевич
cdb59854ee doc: restore documentation for two error codes
ERR_HTTP2_ERROR and ERR_UNKNOWN_BUILTIN_MODULE error codes documentation
seem to have been accidentally removed in commit
1cdb41f287 (pull request #15160).

This reverts that removal, restoring the documentation for those two
error codes.

Those error codes are used from lib/ folder.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21484
Refs: https://github.com/nodejs/node/pull/21470
Refs: https://github.com/nodejs/node/issues/21440
Refs: https://github.com/nodejs/node/pull/15160
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 13:07:58 +03:00
Сковорода Никита Андреевич
5ab3db75bb doc: sort error codes in errors.md
A single exception is that ERR_HTTP2_* comes after ERR_HTTP_*.

Actual content not changed, just some blocks are moved around.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21485
Refs: https://github.com/nodejs/node/pull/21470
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 12:49:01 +03:00
Сковорода Никита Андреевич
baca6d337f doc: add a missing anchor to error codes
Only one error code was missing an appropriate anchor, and it was
ERR_SCRIPT_EXECUTION_TIMEOUT. This commit adds that missing anchor.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21483
Refs: https://github.com/nodejs/node/pull/21470
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 12:34:30 +03:00
Daniel Bevenius
6ced651b6c build: add crypto check to markdown lint target
Currently, if configured --without-ssl the following error will be
repored by remark-cli:

Running Markdown linter on misc docs...
internal/util.js:100
    throw new ERR_NO_CRYPTO();
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support
    at assertCrypto (internal/util.js💯11)
    at crypto.js:31:1
    at NativeModule.compile (internal/bootstrap/loaders.js:235:7)
    at Function.NativeModule.require
      (internal/bootstrap/loaders.js:155:18)
    at Function.Module._load (internal/modules/cjs/loader.js:530:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous>
      (/node/tools/remark-cli/node_modules/math-random/node.js:1:76)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js
      (internal/modules/cjs/loader.js:713:10)
make[1]: *** [tools/.miscmdlintstamp] Error 1
make: *** [lint] Error 2

This commit adds a check for crypto to avoid this error when node has
been configured without crypto support. The alternative was to try to
fix this in randomatic but that lead to another dependency failing
(uuid) and felt like this might be simpler.

PR-URL: https://github.com/nodejs/node/pull/21326
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 06:47:37 +02:00
Vse Mozhet Byt
a40e06233e doc: fix list format in cli.md
PR-URL: https://github.com/nodejs/node/pull/21467
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-22 23:41:12 +03:00
Masashi Hirano
383b1b6d3c test: add tests for end event of stream.Duplex
Added tests to check the stream will automatically end the writable side
when readable side ends when allowHalfOpen option is false.

PR-URL: https://github.com/nodejs/node/pull/21325
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-06-22 13:25:48 -07:00
Matheus Marchini
7edd0a17af
deps: cherry-pick 70c4340 from upstream V8
Original commit message:

    [log][api] Fix GCC 4.9 build failure

    GCC 4.9 used on some Node.js CI machines complains when the control
    reaches the end of a non-void function and no return is encountered.

    R=bmeurer@google.com, ofrobots@google.com, yangguo@google.com

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I5af0192cb187eccbf34dbb60ff3ac2e4774af803
    Reviewed-on: https://chromium-review.googlesource.com/1105619
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53861}

Refs: https://github.com/v8/v8/commit/70c43402ee04d482ff64e186e2faf43fe

PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 09:43:23 -07:00
Matheus Marchini
c6e5043a25
deps: cherry-pick acc336c from upstream V8
Original commit message:

    [log] fix boolean logic on LogCodeObject

    R=yangguo@google.com

    Change-Id: Icb4825344991e5b2d15050e037064c60eeb9617e
    Reviewed-on: https://chromium-review.googlesource.com/1097578
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53777}

Refs: https://github.com/v8/v8/commit/acc336c1257cc7ceee4b31094ee1e9e41

PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 09:43:16 -07:00
Matheus Marchini
9bdc882d58
deps: cherry-pick b20faff from upstream V8
Original commit message:

    [log] fix ExistingCodeLogger behavior on edge case

    ExistingCodeLogger was behaving incorrectly when the
    CodeEventHandler API was used in combination with
    --interpreted-frames-native-stack.  Instead of collecting copied
    trampolines as InterpretedFunction:functionName, they were being
    collected as Builtin:IntepreterEntryTrampolines.  This patch adds
    special handling for copied trampolines when using
    ExistingCodeLogger.

    R=yangguo@google.com

    Change-Id: I3ee4be03800122d28d53b51b20c60dcf6263e4c1
    Reviewed-on: https://chromium-review.googlesource.com/1087813
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53624}

Refs: https://github.com/v8/v8/commit/b20faffb07bc97b869a00b935c639bd1c

PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 09:43:05 -07:00
Matheus Marchini
b3627560a9
deps: backport aa6ce3e from upstream V8
Original commit message:

    [log][api] introduce public CodeEventListener API

    Introduce a new public API called CodeEventListener to allow
    embedders to better support external profilers and other diagnostic
    tools without relying on unsupported methods like --perf-basic-prof.

    Bug: v8:7694
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I063cc965394d59401358757634c9ea84c11517e9
    Co-authored-by: Daniel Beckert <daniel@sthima.com.br>
    Reviewed-on: https://chromium-review.googlesource.com/1028770
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53382}

Refs: https://github.com/v8/v8/commit/aa6ce3ee617b2f324bea3a5d8e3263aee

PR-URL: https://github.com/nodejs/node/pull/21126
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 09:42:46 -07:00
John Barboza
8689c78537 test: avoid running fsync on directory on AIX
On AIX the underlying fsync system call returns EBADF on a file
descriptor for an open directory. So avoid running fsync on it.

PR-URL: https://github.com/nodejs/node/pull/21298
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 11:30:26 -04:00
cjihrig
49ea06fda5
net: report uv_tcp_open() errors
uv_tcp_open() can fail. Prior to this commit, any error was
being silently ignored. This commit raises the errors.

PR-URL: https://github.com/nodejs/node/pull/21428
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 10:41:31 -04:00
cjihrig
d9e95d8982
net: validate fds passed to Socket constructor
This commit validates the file descriptor passed to the TTY
wrap's guessHandleType() function. Prior to this commit, a bad
file descriptor would trigger an abort in the binding layer.

PR-URL: https://github.com/nodejs/node/pull/21429
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-22 10:19:20 -04:00
Ben Noordhuis
7ec6951034 src: avoid common case heap allocation
Optimize three functions that pass on (part of) their JS arguments to
the JS function they call by stack-allocating the storage in the common
case.

PR-URL: https://github.com/nodejs/node/pull/21409
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-22 12:04:20 +02:00
Gireesh Punathil
cbe307dc81 doc: explain HTTP writeHead()'s fast path behavior
calling writeHead() into a Response object that has no headers already
set causes getHeader() to return undefined, even if the header was set
in the writeHead() function call. Explain this behavior as an
optimiation as opposed to a bug.

Fixes: https://github.com/nodejs/node/issues/10354
PR-URL: https://github.com/nodejs/node/pull/21289

Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-22 15:29:59 +05:30
Daniel Bevenius
9ca41e9642 src: introduce inspect-brk-node
This commit is a suggestion to add a new option to the node executable
to allow for breaking in node's javascript bootstrapper code.

Previously I've been able to set breakpoints in node bootstrapper code
and then restart the debugging session and those breakpoints would be
hit, but I don't seem to be able to do so anymore. Having this option
would allow me to use this option and then step through or add more
break points as needed.

PR-URL: https://github.com/nodejs/node/pull/20819
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-22 05:20:49 +02:00
Christopher Hiller
2f1a23e5be tools: fix typo in .eslintrc.js
Refs: https://github.com/nodejs/node/pull/18566

PR-URL: https://github.com/nodejs/node/pull/21449
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-21 16:20:25 -07:00
Gus Caplan
84f3769ab1
atomis: add notify alias
PR-URL: https://github.com/nodejs/node/pull/21413
Refs: https://github.com/nodejs/node/issues/21219
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-21 16:23:38 -05:00
Matheus Marchini
40b1f08a0f
deps: cherry-pick 5dd3395 from upstream V8
Original commit message:

    [log] improve --perf-basic-prof-only-functions

    Change --perf-basic-prof-only-functions to also log builtin code
    creation events, otherwise InterpretedFunctions generated by
    --interpreted-frames-native-stack will be filtered out.

    R=yangguo@google.com

    Change-Id: Ib0623fca88e25c514473a43de56ebbbdcb146f97
    Reviewed-on: https://chromium-review.googlesource.com/1100014
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53760}

Refs: https://github.com/v8/v8/commit/5dd33955d5cb1d84dd2509363e11d3c2a

PR-URL: https://github.com/nodejs/node/pull/21386
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-21 08:57:55 -07:00
Jamie Davis
25e5ae4168 doc: note synchronous part of child_process.spawn
If an application has a large RSS (GB), jorangreef
observed that child_process.spawn will block the
event loop for ms-s.

This is surprising behavior and merits documentation.

Refs: https://github.com/nodejs/node/issues/14917

PR-URL: https://github.com/nodejs/node/pull/21234
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-21 07:20:58 -07:00
Masashi Hirano
2066cd42b6 test: assert process.setgroups is undefined on windows
PR-URL: https://github.com/nodejs/node/pull/21286
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-21 06:28:44 -07:00
Masashi Hirano
77bbdfd409 test: add tests for process.setgroups()
Added tests to validate process.setgroups() arguments

PR-URL: https://github.com/nodejs/node/pull/21286
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-21 06:28:36 -07:00
Daniel Bevenius
b56f65e28c doc: add example of using filter with cctest
This commit adds examples of specifying filters when running cctest.
This can be useful when debugging and limiting the test cases run to
the test cases of interest and I think worth documenting.

PR-URL: https://github.com/nodejs/node/pull/21401
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-21 13:30:40 +02:00
guybedford
883e1cd21d module: experimental modules runMain separation
PR-URL: https://github.com/nodejs/node/pull/21350
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-21 12:54:09 +02:00
Thomas Watson
182ee78164
doc: fix missing parentPort link in worker_threads
PR-URL: https://github.com/nodejs/node/pull/21430
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-21 11:50:14 +02:00
Anna Henningsen
7a2e2fb36d
http2: fix memory leak when headers are not emitted
When headers are not emitted to JS, e.g. because of an error
before that could happen, we currently still have the vector of
previously received headers lying around, each one holding
a reference count of 1.

To fix the resulting memory leak, release them in the `Http2Stream`
destructor.

Also, clear the vector of headers once they have been emitted –
there’s not need to keep it around, wasting memory.

PR-URL: https://github.com/nodejs/node/pull/21373
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-20 22:52:49 +02:00
Anna Henningsen
d362b07e78
test: move net bytes-per-chunk test to parallel
This was added in 3217e8e66f as
a regression test for a security patch. We moved it to
`sequential` to lower the risk of creating a flaky test,
because an earlier version of it was failing one some platforms.

There is no known reason why te test should be flaky in this form,
though, and moving it to parallel would be good because it does take
around 3 seconds that would otherwise fully count towards the
test run time.

PR-URL: https://github.com/nodejs/node/pull/21322
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 22:50:23 +02:00
Anna Henningsen
7aa95670a1
src: fix debugging for multiple categories
Fix parsing of e.g. `NODE_DEBUG_NATIVE=worker,messaging`.

PR-URL: https://github.com/nodejs/node/pull/21422
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 22:48:54 +02:00
Michaël Zasso
0eb8a8cb12
crypto: refer to correct deprecation id in comment
PR-URL: https://github.com/nodejs/node/pull/21399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-20 22:02:48 +02:00
Michaël Zasso
680aeb3467
2018-16-20, Version 10.5.0 (Current)
Notable changes:

* **crypto**:
  * Support for `crypto.scrypt()` has been added.
    [#20816](https://github.com/nodejs/node/pull/20816)
* **fs**:
  * BigInt support has been added to `fs.stat` and `fs.watchFile`.
    [#20220](https://github.com/nodejs/node/pull/20220)
  * APIs that take `mode` as arguments no longer throw on values larger
    than `0o777`. [#20636](https://github.com/nodejs/node/pull/20636)
    [#20975](https://github.com/nodejs/node/pull/20975)
    (Fixes: [#20498](https://github.com/nodejs/node/issues/20498))
  * Fix crashes in closed event watchers.
    [#20985](https://github.com/nodejs/node/pull/20985)
    (Fixes: [#20297](https://github.com/nodejs/node/issues/20297))
* **Worker Threads**:
  * Support for multi-threading has been added behind the
    `--experimental-worker` flag in the `worker_threads` module.
    This feature is *experimental* and may receive breaking changes at
    any time. [#20876](https://github.com/nodejs/node/pull/20876)

PR-URL: https://github.com/nodejs/node/pull/21400
2018-06-20 20:39:16 +02:00
cjihrig
a77b30ca7f
dns: remove Resolver#cancel() from promises API
Because reasons.

PR-URL: https://github.com/nodejs/node/pull/21264
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-20 13:36:43 -04:00
cjihrig
7486c4d710
dns: add promisified dns module
PR-URL: https://github.com/nodejs/node/pull/21264
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-20 13:35:27 -04:00
Kevin Thomas
fea3595c2f test: remove the third string literal argument from assert.strictEqual()
Third string literal argument in assert.strictEqual() needs to be
removed. Otherwise, on AssertionError it would not display the
values that failed the check -- this hinders debugging.
The string literals are added as comments above the check.

PR-URL: https://github.com/nodejs/node/pull/21406
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 10:09:08 -07:00
Joyee Cheung
e43d91cdc1
process: split bootstrappers by threads that can run them
This patch split part of the bootstrappers into three files:

- `lib/internal/process/main_thread_only.js`: contains bootstrappers
  that can only be run in the main thread, including
  - `setupStdio` for the main thread that sets up `process.stdin`,
    `process.stdout`, `process.error` that may interact with external
    resources, e.g. TTY/File/Pipe/TCP sockets
  - `setupProcessMethods` that setup methods changing process-global
    states, e.g. `process.chdir`, `process.umask`, `process.setuid`
  - `setupSignalHandlers`
  - `setupChildProcessIpcChannel` that setup `process.send` for
    child processes.
- `lib/internal/process/worker_thread_only.js`: contains bootstrappers
  that can only be run in the worker threads, including
  - `setupStdio` for the worker thread that are streams to be
    manipulated or piped to the parent thread
- `lib/internal/process/per_thread.js`: contains bootstrappers
    that can be run in all threads, including:
  - `setupAssert` for `process.assert`
  - `setupCpuUsage` for `process.cpuUsage`
  - `setupHrtime` for `process.hrtime` and `process.hrtime.bigint`
  - `setupMemoryUsage` for `process.memoryUsage`
  - `setupConfig` for `process.config`
  - `setupKillAndExit` for `process.kill` and `process.exit`
  - `setupRawDebug` for `process._rawDebug`
  - `setupUncaughtExceptionCapture` for
    `process.setUncaughtExceptionCaptureCallback` and
    `process.hasUncaughtExceptionCaptureCallback`

Hopefully in the future we can sort more bootstrappers in
`boostrap/node.js` into these three files and further group
them into functions that can be run before creating the
snapshot / after loading the snapshot.

This patch also moves most of the `isMainThread` conditionals
into the main bootstrapper instead of letting them scattered around
special-casing different implementations.

PR-URL: https://github.com/nodejs/node/pull/21378
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-06-21 00:09:53 +08:00
cjihrig
420d8afe3d
child_process: change windowsHide default to true
This is likely the default that more Windows users are
expecting.

PR-URL: https://github.com/nodejs/node/pull/21316
Refs: https://github.com/libuv/libuv/pull/1878
Refs: https://github.com/nodejs/node/pull/21314
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 11:02:01 -04:00
James M Snell
99e6ecbb17
workers,trace_events: set thread name for workers
Set the thread name for workers in trace events. Also,
use uint64_t for thread_id_ because there's really no
reason for those to be doubles

PR-URL: https://github.com/nodejs/node/pull/21246
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-20 16:02:36 +02:00
Joyee Cheung
3ff1cb955f
process: remove unused arguments in setup()
PR-URL: https://github.com/nodejs/node/pull/21377
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 20:02:57 +08:00
Yang Guo
ed1035d335 build: fix building with --build-v8-with-gn
PR-URL: https://github.com/nodejs/node/pull/21330
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 07:51:51 +02:00
Daniel Bevenius
a71d5fc725 src: remove .h if -inl.h is already included
This commit removes the normal header file include if an internal one
is specified as per the CPP_STYLE_GUIDE.

PR-URL: https://github.com/nodejs/node/pull/21381
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-06-20 05:42:39 +02:00