Alex R
b149eefa82
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-02 14:50:20 +02:00
Robert Nagy
138eb32be1
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-01 13:05:10 +02:00
Guy Bedford
534c204e22
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-03-31 20:39:01 -06:00
Denys Otrishko
fd7e5d40a4
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 17:22:22 +02:00
murgatroid99
18c3ff99aa
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 17:21:13 +02:00
himself65
defbc2ed82
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 17:10:25 +02:00
Yash Ladha
a5e81e72b6
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 10:26:30 +02:00
Saajan
4fc13b016a
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 10:25:41 +02:00
Robert Nagy
2bf02285a3
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 10:25:03 +02:00
himself65
1bbd679adc
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 10:22:52 +02:00
Robert Nagy
e034f5c3d9
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 10:22:11 +02:00
Sk Sajidul Kadir
97ef4d76c9
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 10:18:58 +02:00
Gus Caplan
89ae1f1b73
util: fix inspecting document.all
...
Fixes: https://github.com/nodejs/node/issues/31889
PR-URL: https://github.com/nodejs/node/pull/31938
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-03-30 10:17:08 +02:00
James M Snell
05aa67aa21
console: fixup error message
...
Use "options.inspectOptions" instead of just "inspectOptions"
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32475
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-28 14:37:32 +01:00
James M Snell
7d3791a3a4
fs: fixup error message for invalid options.recursive
...
Use "options.recursive" instead of just "recursive"
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32472
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-28 14:36:27 +01:00
James M Snell
ca19d553cf
http: fixup options.method error message
...
Use `options.method` instead of just `method`
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32471
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-27 16:01:24 +01:00
James M Snell
a0578714bf
repl: fixup error message
...
Use "cmd.action" instead of just "action" for ERR_INVALID_ARG_TYPE
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32474
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-27 15:59:43 +01:00
Robert Nagy
1428a92492
stream: make pipeline try to wait for 'close'
...
Pipeline uses eos which will invoke the callback
on 'finish' and 'end' before all streams have been
fully destroyed.
Fixes: https://github.com/nodejs/node/issues/32032
PR-URL: https://github.com/nodejs/node/pull/32158
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-27 15:55:21 +01:00
Robert Nagy
0d0f151a46
stream: emit 'pause' on unpipe
...
unpipe should use pause() instead of mutating
state.flowing directly so that pausing side
effects such as emitting 'pause' are properly
performed.
Fixes: https://github.com/nodejs/node/issues/32470
PR-URL: https://github.com/nodejs/node/pull/32476
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-26 14:48:18 -04:00
Robert Nagy
388cef61e8
stream: align stream.Duplex with net.Socket
...
stream.Duplex and net.Socket slightly differs in behavior.
Especially when it comes to the case where one side never
becomes readable or writable. This aligns Duplex with the
behavior of Socket.
PR-URL: https://github.com/nodejs/node/pull/32139
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-25 15:20:22 +01:00
Robert Nagy
05f1df5200
stream: fix pipeline with dest in objectMode
...
pipeline did not support destination with generator
that does not return strings or buffers.
PR-URL: https://github.com/nodejs/node/pull/32414
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-25 14:46:10 +01:00
Robert Nagy
eeccd52b4e
net: make readable/writable start as true
...
`net.Socket` is slightly breaking stream invariants by
having readable/writable going from `false` to `true`.
Streams assume that readable/writable starts out `true`
and then goes to `false` through `push(null)`/`end()`
after which it never goes back to `true`, e.g. once a
stream is `writable == false` it is assumed it will
never become `true`.
This PR changes 2 things:
Unless explicitly set to `false` through options:
- starts as `readable`/`writable` `true` by default.
- uses `push(null)`/`end()` to set `readable`/`writable`
to `false`. Note that this would cause the socket to
emit the `'end'`/`'finish'` events, which it did not
do previously.
In the case it is explicitly set to `false` through
options` it is assumed to never become `true`.
PR-URL: https://github.com/nodejs/node/pull/32272
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-24 09:45:25 +01:00
Jan Krems
07a1fb953e
module: add hook for global preload code
...
PR-URL: https://github.com/nodejs/node/pull/32068
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-03-23 08:39:37 -05:00
Robert Nagy
a9401439c7
zlib: align with streams
...
- Ensure automatic destruction only happens after both
'end' and 'finish' has been emitted through autoDestroy.
- Ensure close() callback is always invoked.
- Ensure 'error' is only emitted once.
PR-URL: https://github.com/nodejs/node/pull/32220
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-19 10:56:45 +01:00
Michaël Zasso
9b6e797379
Revert "assert: fix line number calculation after V8 upgrade"
...
This reverts commit 5981fb7faa .
PR-URL: https://github.com/nodejs/node/pull/32116
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-18 16:35:41 -07:00
Robert Nagy
a9270dcbeb
http: don't emit 'finish' after 'error'
...
PR-URL: https://github.com/nodejs/node/pull/32276
Refs: https://github.com/nodejs/node/issues/28710
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-18 13:09:26 +01:00
cjihrig
c788964a75
errors: drop pronouns from ERR_WORKER_PATH message
...
This commit drops pronouns from the ERR_WORKER_PATH message,
and also shortens the text a bit.
PR-URL: https://github.com/nodejs/node/pull/32285
Refs: https://github.com/nodejs/node/pull/31664
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-17 13:27:16 -07:00
Sam Roberts
8cbbc70fbc
src,cli: support compact (one-line) JSON reports
...
Multi-line JSON is more human readable, but harder for log aggregators
to consume, they usually require a log message per line, particularly
for JSON. Compact output will be consumable by aggregators such as EFK
(Elastic Search-Fluentd-Kibana), LogDNA, DataDog, etc.
PR-URL: https://github.com/nodejs/node/pull/32254
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-03-17 08:42:41 -07:00
Robert Nagy
9b20b5db7b
stream: don't emit 'finish' after 'error'
...
PR-URL: https://github.com/nodejs/node/pull/32275
Refs: https://github.com/nodejs/node/issues/28710
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-17 14:49:49 +01:00
cjihrig
9d1a3b6f60
doc,lib,src,test: make --experimental-report a nop
...
This commit makes the --experimental-report CLI flag a no-op.
PR-URL: https://github.com/nodejs/node/pull/32242
Fixes: https://github.com/nodejs/node/issues/26293
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-15 13:29:34 -04:00
Anna Henningsen
605615e5f3
esm: port loader code to JS
...
There is no reason for this to be in C++. Using JavaScript means that
the code is more accessible to more developers, which is important
for any Node.js feature. This also simplifies the code significantly
in some areas. On the technical side, this potentially also enables
making some of the file system operations that are involved
asynchronous.
PR-URL: https://github.com/nodejs/node/pull/32201
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-03-13 17:34:43 +01:00
Bradley Farias
417d847de2
util: text decoding allows SharedArrayBuffer
...
PR-URL: https://github.com/nodejs/node/pull/32203
Fixes: https://github.com/nodejs/node/issues/32199
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-13 17:33:41 +01:00
Mateusz Krawczuk
4ffb39bdfe
http2: rename counter in mapToHeaders inner loop
...
This change is to prevent potential bugs - e.g., someone might
automatically use the variable `k` instead of `key`, that is used in
vicinity of this loop.
Also changed postincrement to preincrement in iteration steps. It is
probably done by the optimizer anyway, but otherwise it will save an
opcode each iteration. And it is a good practice.
PR-URL: https://github.com/nodejs/node/pull/32012
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-13 15:06:58 +01:00
Antoine du HAMEL
a8b3d7b26b
worker: allow URL in Worker constructor
...
The explicit goal is to let users use `import.meta.url` to
re-load thecurrent module inside a Worker instance.
Fixes: https://github.com/nodejs/node/issues/30780
PR-URL: https://github.com/nodejs/node/pull/31664
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-03-13 10:50:30 +01:00
Ruben Bridgewater
9c18ff6440
repl: align preview with the actual executed code
...
This adds preview output for input that may not be wrapped.
PR-URL: https://github.com/nodejs/node/pull/32154
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-13 09:58:12 +01:00
ExE Boss
ba684805b6
util: use a global symbol for util.promisify.custom
...
Define `util.promisify.custom`
as `Symbol.for("nodejs.util.inspect.custom")`, rather than
as `Symbol("util.inspect.custom")`.
This allows custom `promisify` wrappers to easily/safely be defined
in non‑Node.js environments.
Fixes: https://github.com/nodejs/node/issues/31647
PR-URL: https://github.com/nodejs/node/pull/31672
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-12 19:51:25 +01:00
himself65
12845a8bd1
lib: use spread operator on cluster
...
PR-URL: https://github.com/nodejs/node/pull/32125
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-12 16:58:08 +01:00
himself65
b1a13b12f2
lib: change var to let/const
...
PR-URL: https://github.com/nodejs/node/pull/32037
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-12 16:52:16 +01:00
Robert Nagy
2bfb3403ed
stream: avoid destroying writable source
...
User might still want to be able to use the writable side
of src. This is in the case where e.g. the Duplex input
is not directly connected to its output. Such a case could
happen when the Duplex is reading from a socket and then echos
the data back on the same socket.
PR-URL: https://github.com/nodejs/node/pull/32198
Refs: https://github.com/nodejs/node/commit/4d93e105bfad79ff6c6f01e4b7c2fdd70caeb43b#commitcomment-37751035
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-11 20:57:42 -04:00
Robert Nagy
f8f20892e9
stream: avoid destroying http1 objects
...
http1 objects are coupled with their corresponding
res/req and cannot be treated independently as
normal streams. Add a special exception for this
in the pipeline cleanup.
Fixes: https://github.com/nodejs/node/issues/32184
PR-URL: https://github.com/nodejs/node/pull/32197
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-11 15:03:31 -04:00
Ben Noordhuis
3b9a4035e7
crypto: optimize sign.update() and verify.update()
...
Use `StringBytes::InlineDecoder` to decode strings inputs in C++ land
instead of decoding them to buffers in JS land before passing them on
to the C++ layer. This is what the other update() methods already did.
PR-URL: https://github.com/nodejs/node/pull/31767
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-03-11 19:30:56 +01:00
himself65
517b0470c7
esm: remove unused parameter on module.instantiate
...
PR-URL: https://github.com/nodejs/node/pull/32147
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-11 17:39:47 +01:00
Gerhard Stoebich
943887f5be
http, async_hooks: remove unneeded reference to wrapping resource
...
Remove the reference from handle to the unique/wrapping resource
ReusedHandle as there is meanwhile a strong reference for all async
resources in place via AsyncWarp::resource_.
PR-URL: https://github.com/nodejs/node/pull/32054
Refs: https://github.com/nodejs/node/pull/30959
Refs: https://github.com/nodejs/node/pull/30196
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-03-11 17:31:18 +01:00
Sergey Zelenov
0c545f0f72
zlib: emits 'close' event after readable 'end'
...
Call the close method after readable 'end' so that 'close' will be
emitted afterwards.
Fixes: https://github.com/nodejs/node/issues/32023
PR-URL: https://github.com/nodejs/node/pull/32050
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-11 17:30:22 +01:00
Lucas Holmquist
b6da55f0fd
fs: make fs.read params optional
...
This makes all the parameters of the `fs.read` function, except
for `fd` and the callback(when not using as a promise) optional.
They will default to sensible defaults.
Fixes: https://github.com/nodejs/node/issues/31237
PR-URL: https://github.com/nodejs/node/pull/31402
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2020-03-11 16:47:29 +01:00
Matteo Collina and Robert Nagy
d7fe5548ef
stream: do not swallow errors with async iterators and pipeline
...
Before this patch, pipeline() could swallow errors by pre-emptively
producing a ERR_STREAM_PREMATURE_CLOSE that was not really helpful
to the user.
Co-Authored-By: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/32051
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-03-11 16:22:22 +01:00
Robert Nagy
c1b2f6afbe
http: detach socket from IncomingMessage on keep-alive
...
If the socket is not detached then a future call to res.destroy
(through e.g. pipeline) would unecessarily kill the socket while
its in the agent free list.
PR-URL: https://github.com/nodejs/node/pull/32153
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-10 23:44:49 +01:00
Robert Nagy
173d044d09
http: align OutgoingMessage and ClientRequest destroy
...
Added .destroyed property to OutgoingMessage and ClientRequest
to align with streams.
Fixed ClientRequest.destroy to dump res and re-use socket in agent
pool aligning it with abort.
PR-URL: https://github.com/nodejs/node/pull/32148
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-10 18:15:01 +01:00
Stephen Belanger
d368dcc63a
async_hooks: add sync enterWith to ALS
...
This allows transitioning the entire following sync and async execution
sub-tree to the given async storage context. With this one can be sure
the context binding will remain for any following sync activity and all
descending async execution whereas the `run*(...)` methods must wrap
everything that is intended to exist within the context. This is helpful
for scenarios such as prepending a `'connection'` event to an http
server which binds everything that occurs within each request to
the given context. This is helpful for APMs to minimize the need
for patching and especially adding closures.
PR-URL: https://github.com/nodejs/node/pull/31945
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-03-09 14:24:21 -04:00
Juan José Arboleda
c1e672595f
src: create a getter for kernel version
...
PR-URL: https://github.com/nodejs/node/pull/31732
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-03-09 12:44:16 +01:00