Commit Graph

30159 Commits

Author SHA1 Message Date
Juan José Arboleda
edf35db27e
test: replace flag expose_internals to expose-internals
PR-URL: https://github.com/nodejs/node/pull/32542
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-11 10:05:41 +02:00
himself65
079a32e31c
test: use common.mustCall in test-worker-esm-exit
PR-URL: https://github.com/nodejs/node/pull/32544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-11 10:05:40 +02:00
Daniel Estiven Rico Posada
cca269c3a0
test: use template strings in parallel tests
PR-URL: https://github.com/nodejs/node/pull/32549
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:05:40 +02:00
James M Snell
62db9a0678
src: minor http2 refactorings
* Simplify Http2Priority struct
* BooleanValue => IsTrue/IsFalse

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-11 10:05:40 +02:00
James M Snell
8f766e8397
src: rename http2 class and suppress compile warnings
Suppress compile warnings on Windows, rename class for
consistent styling.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-11 10:05:39 +02:00
James M Snell
afc6a25f42
src: use smart pointers for nghttp2 objects
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-11 10:05:39 +02:00
Anna Henningsen
4df3ac2a63
src: remove loop_init_failed_ from Worker class
There’s no reason for this to not be stored alongside the loop
data structure itself.

PR-URL: https://github.com/nodejs/node/pull/32562
Refs: https://github.com/nodejs/node/pull/32344
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:05:39 +02:00
Anna Henningsen
0faaa7c84c
src: clean up worker thread creation code
Instead of setting and then in the case of error un-setting properties,
only set them when no error occurs.

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

PR-URL: https://github.com/nodejs/node/pull/32562
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:05:39 +02:00
Hachimi Aa (Sfeir)
b6f71969a0
doc: improve fs.read documentation
PR-URL: https://github.com/nodejs/node/pull/29270
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-11 10:05:38 +02:00
Ben Noordhuis
0e4ce8f50a
test: add known issues test for #31733
Authenticated decryption works for file streams up to 32768 bytes but
not beyond. Other streams and direct decryption are not affected.

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

PR-URL: https://github.com/nodejs/node/pull/31734
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-11 10:05:38 +02:00
Anna Henningsen
c09552063b
report: add missing locks for report_on_fatalerror accessors
Overlooked in 2fa74e3e38.

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

PR-URL: https://github.com/nodejs/node/pull/32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-04-11 10:05:38 +02:00
Anna Henningsen
f284d599bb
src: move JSONWriter into its own file
The JSONWriter feature is not inherently related to the report
feature in any way.

As a drive-by fix, remove a number of unused header includes.

PR-URL: https://github.com/nodejs/node/pull/32552
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-04-11 10:03:12 +02:00
Anna Henningsen
e066584d94
src: align PerformanceState class name with conventions
Class names are written in UpperCamelCase. Otherwise, this looks like
it’s a variable, not a class name.

PR-URL: https://github.com/nodejs/node/pull/32539
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:03:12 +02:00
Andrey Pechkurov
78b90d9bc4
benchmark: fix error on server close in AsyncLocalStorage benchmark
PR-URL: https://github.com/nodejs/node/pull/32503
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-04-11 10:01:16 +02:00
Alex R
8597df48f7
http: fix incorrect headersTimeout measurement
For keep-alive connections, the headersTimeout may fire during
subsequent request because the measurement was reset after
a request and not before a request.

PR-URL: https://github.com/nodejs/node/pull/32329
Fixes: https://github.com/nodejs/node/issues/27363
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-11 10:01:16 +02:00
Anna Henningsen
4acd7f4390
worker: do not emit 'exit' events during process.exit()
Do not emit `'exit'` events caused by recursively stopping all
running Workers from inside the `process.exit()` call.

PR-URL: https://github.com/nodejs/node/pull/32546
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-11 10:01:15 +02:00
Anna Henningsen
4e5271acfb
tracing: do not attempt to call into JS when disallowed
PR-URL: https://github.com/nodejs/node/pull/32548
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:01:15 +02:00
Myles Borins
f0a31e33a8
doc: update releaser list in README.md
Moved emeritus members keys and fixed alphabetization issues

PR-URL: https://github.com/nodejs/node/pull/32577
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-11 10:01:15 +02:00
Hassaan Pasha
8586838feb
deps: update archs files for OpenSSL-1.1.1f
After an OpenSSL source update, all the config files need to be
 regenerated and comitted by:
    $ cd deps/openssl/config
    $ make
    $ git add deps/openssl/config/archs
    $ git add deps/openssl/openssl/include/crypto/bn_conf.h
    $ git add deps/openssl/openssl/include/crypto/dso_conf.h
    $ git add deps/openssl/openssl/include/openssl/opensslconf.h
    $ git commit

PR-URL: https://github.com/nodejs/node/pull/32583
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-04-11 10:01:14 +02:00
Hassaan Pasha
3417cc5777
deps: upgrade openssl sources to 1.1.1f
This updates all sources in deps/openssl/openssl by:
    $ cd deps/openssl/
    $ rm -rf openssl
    $ tar zxf ~/tmp/openssl-1.1.1f.tar.gz
    $ mv openssl-1.1.0h openssl
    $ git add --all openssl
    $ git commit openssl

PR-URL: https://github.com/nodejs/node/pull/32583
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-04-11 10:01:13 +02:00
Myles Borins
28077a01cc
test: mark test-http2-reset-flood flaky on bsd
This test is somewhat regularly flaky on 12.x and it appears master as
well. There appears to be an issue tracking flakes for 6+ months. Seems
reasonable to mark this to keep us from having red CI.

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

PR-URL: https://github.com/nodejs/node/pull/32595
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-11 10:01:13 +02:00
Myles Borins
ca2662012e
test: add test-worker-prof to the SLOW list for debug
Consistently failing on ubuntu1804_sharedlibs_debug_x64

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

PR-URL: https://github.com/nodejs/node/pull/32589
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-04-11 10:01:13 +02:00
Robert Nagy
3c8bf9022a
net: wait for shutdown to complete before closing
When not allowing half open, handle.close would be
invoked before shutdown has been called and
completed causing a potential data race.

Fixes: https://github.com/nodejs/node/issues/32486#issuecomment-604072559

PR-URL: https://github.com/nodejs/node/pull/32491
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-11 10:01:13 +02:00
gengjiawen
9ee2afa0f7
doc: add ASAN build instructions
PR-URL: https://github.com/nodejs/node/pull/32436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-04-11 10:01:12 +02:00
Guy Bedford
bc7f819263
module: path-only CJS exports extension searching
PR-URL: https://github.com/nodejs/node/pull/32351
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-11 10:01:11 +02:00
Richard Lau
ffdd82ba3f
tools: only fetch previous versions when necessary
Refactor the logic for working out the previous versions of Node.js for
the API documentation so that the parsing (including the potential https
get) happens at most once per build (as opposed to the current once per
generated API doc).

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32518
Fixes: https://github.com/nodejs/node/issues/32512
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-31 18:32:52 -04:00
Rich Trott
8bcbb8d7dd
test: refactor test-http-information-processing
Replace magic numbers with constant.
Use for loop for repeated code.
Reduce console logging.
Remove unneeded countdown module use.

PR-URL: https://github.com/nodejs/node/pull/32547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-31 18:09:01 -04:00
Sam Roberts
04237eca55
src: handle report options on fatalerror
Follow on to https://github.com/nodejs/node/pull/32207, 3 other options
are also not respected under situations that the isolate is not
available.

PR-URL: https://github.com/nodejs/node/pull/32497
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-31 18:09:00 -04:00
Gabriel Schulhof
979fb155ff
doc: update context-aware section of addon doc
Replace the portion of the context-aware addon example that advocates
for managing the life cycle of the per-addon-instance data using a
weak reference with code that illustrates how to manage its life cycle
using an environment cleanup hook.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/28659
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-03-31 18:09:00 -04:00
James M Snell
5080491ae4
src: refactoring and cleanup of node_i18n
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32438
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-03-31 18:08:59 -04:00
Denys Otrishko
4f98b7178d
wasi: clean up options validation
PR-URL: https://github.com/nodejs/node/pull/31797
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-30 19:18:57 +02:00
murgatroid99
e14317a840
dns: add dns.ALL hints flag constant
PR-URL: https://github.com/nodejs/node/pull/32183
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:56 +02:00
Luigi Pinca
b494053745
doc: update AUTHORS list
PR-URL: https://github.com/nodejs/node/pull/32222
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-30 19:18:56 +02:00
Ben Noordhuis
2c32e59d8d
crypto: clear openssl error stack after en/decrypt
The publicEncrypt/privateDecrypt/etc. family of functions didn't clear
OpenSSL's error stack on early return.

Notably, trying to use an encrypted key with the wrong passphrase left
an error on the stack that made subsequent encrypt or decrypt operations
fail, even with an unencrypted key.

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

PR-URL: https://github.com/nodejs/node/pull/32248
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-03-30 19:18:56 +02:00
himself65
e2b08f0ea8
src: remove unnecessary 'Local.As' operation
PR-URL: https://github.com/nodejs/node/pull/32286
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:55 +02:00
himself65
b8b8e82591
fs: fix fs.read when passing null value
PR-URL: https://github.com/nodejs/node/pull/32479
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2020-03-30 19:18:53 +02:00
himself65
1fc19b0fb0
test: fix a typo on test-fs-read-optional-params
PR-URL: https://github.com/nodejs/node/pull/32461
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-03-30 19:18:52 +02:00
Xu Meng
986a60544a
test: skip a wasi test on IBMi PASE
The API clock_getres with attribute API CLOCK_THREAD_CPUTIME_ID
is not supported on IBM i PASE.

PR-URL: https://github.com/nodejs/node/pull/32459
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-30 19:18:51 +02:00
Harshitha KP
833d78afcf
worker: runtime error on pthread creation
With large number of worker threads pthread
fails with hard assertion.
Instead of hard assertion throw a runtime error.

PR-URL: https://github.com/nodejs/node/pull/32344
Fixes: https://github.com/nodejs/node/issues/32319
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:50 +02:00
Yash Ladha
5740a70e5d
lib: removed unused error code
PR-URL: https://github.com/nodejs/node/pull/32481
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-30 19:18:49 +02:00
Saajan
cad768eb86
stream: change var to let/const in stream files
PR-URL: https://github.com/nodejs/node/pull/32214
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-30 19:18:49 +02:00
Robert Nagy
ff3615d5d9
http: move free socket error handling to agent
The http client should not know anything about free sockets. Let
the agent handle its pool of sockets.

PR-URL: https://github.com/nodejs/node/pull/32003
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-03-30 19:18:48 +02:00
Harshitha KP
73fec7cd00
test: harden the tick sampling logic
Under peculiar system load conditions, the profiler thread
does not get enough CPU slices to perform the sampling.
Improve the interaction between worker and parent thread
by performing a large disc read, which is a better blend of
CPU and I/O bound work, than earlier versions.
This produces x10 more samples than the existing one,
in 10 iterations, as opposed to 1024.

Also capture worker error situations to improve debugging

Refs: https://github.com/nodejs/node/issues/26401#issuecomment-597438516

PR-URL: https://github.com/nodejs/node/pull/32190
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:47 +02:00
Bartlomiej Brzozowski
2ee684a7b9
win,build: set exit_code on configure failure
PR-URL: https://github.com/nodejs/node/pull/32205
Fixes: https://github.com/nodejs/node/issues/31573
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:46 +02:00
himself65
68608b2bdc
lib: replace Array to ArrayIsArray by primordials
PR-URL: https://github.com/nodejs/node/pull/32258
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-30 19:18:45 +02:00
Robert Nagy
7c3c06224c
http: don't emit 'readable' after 'close'
PR-URL: https://github.com/nodejs/node/pull/32277
Refs: https://github.com/nodejs/node/issues/28710
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:44 +02:00
Antoine du HAMEL
6d4d299f4d
doc: tests local links in markdown documents
PR-URL: https://github.com/nodejs/node/pull/32359
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-03-30 19:18:44 +02:00
Harshitha KP
1905b9ecce
test: als variant of test-timers-clearImmediate
Refs: https://github.com/nodejs/node/issues/31978

PR-URL: https://github.com/nodejs/node/pull/32303
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:43 +02:00
Xu Meng
72983d2e4f
test: skip some binding tests on IBMi PASE
IBMi PASE Node.js always links to shared openssl
and zlib libraries. So skip the static binding tests.

PR-URL: https://github.com/nodejs/node/pull/31967
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-03-30 19:18:41 +02:00
Sk Sajidul Kadir
30d55a3517
fs: add fs.readv()
Fixes: https://github.com/nodejs/node/issues/2298
PR-URL: https://github.com/nodejs/node/pull/32356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-30 19:18:41 +02:00