0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

28086 Commits

Author SHA1 Message Date
Robert Nagy
897587c013 stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: https://github.com/nodejs/node/pull/29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-02 16:31:33 +02:00
David Carlier
94c944d0d5 tools: fix mksnapshot blob wrong freeing operator
PR-URL: https://github.com/nodejs/node/pull/29384
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-09-01 23:52:42 -07:00
Anna Henningsen
9e23eeffd0 console: use getStringWidth() for character width calculation
This is more accurate for displayed full-width characters
(e.g. CJK ones) and makes the calculations match the ones we
use in the readline module.

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

PR-URL: https://github.com/nodejs/node/pull/29300
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@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: James M Snell <jasnell@gmail.com>
2019-09-02 11:43:58 +05:30
Anna Henningsen
2cc757f0c7 src: do not crash when accessing empty WeakRefs
Making `.incRef()` and `.decRef()` fail silently leads to better error
messages when trying to access the underlying value (as opposed to
crashing inside these methods).

Refs: https://github.com/nodejs/node/pull/25461#issuecomment-524481482

PR-URL: https://github.com/nodejs/node/pull/29289
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
2019-09-01 23:10:54 -07:00
Anna Henningsen
0f3aa81eab src: turn GET_OFFSET() into an inline function
There’s no need for this to be a macro.

PR-URL: https://github.com/nodejs/node/pull/29357
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-02 07:57:06 +02:00
Anna Henningsen
5a52bdad9b src: inline SLICE_START_END() in node_buffer.cc
This macro is only used once, so it doesn’t need to be a macro.

PR-URL: https://github.com/nodejs/node/pull/29357
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-02 07:56:56 +02:00
Nick Schonning
61d973affb doc: escape elements swallowed as HTML in markdown
Addresses Markdownlint MD033 issues.
Altering changlog should usually be avoided, but they don't render
currently.

PR-URL: https://github.com/nodejs/node/pull/29374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-02 07:46:45 +02:00
cclauss
c602b0a4e5 build: add full Python 3 tests to Travis CI
PR-URL: https://github.com/nodejs/node/pull/29360
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-09-01 10:36:06 -07:00
Kamat, Trivikram
89aea1514b doc: add extends for derived classes
PR-URL: https://github.com/nodejs/node/pull/29290
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-01 08:18:10 -07:00
Nick Schonning
9ab1e07774 doc: add blanks around code fences
Addresses Markdownlint MD031 rule warnings

PR-URL: https://github.com/nodejs/node/pull/29366
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-31 15:31:13 -07:00
Nick Schonning
ee8f02b0d7 doc: format http2 anchor link and reference
Some links were flagged as empty links by Markdownlint MD042.
The HttpServerResponse anchor link was also not defined.

PR-URL: https://github.com/nodejs/node/pull/29362
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@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>
2019-08-31 15:29:39 -07:00
Nick Schonning
9a46cfc337 doc: remove multiple consecutive blank lines
These are rendered as single breaks.
Addresses Markdownlint MD012 rule.

PR-URL: https://github.com/nodejs/node/pull/29352
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-31 15:27:58 -07:00
Robert Nagy
cad3a21c1d http: simplify timeout handling
Avoids allocating and registering extra listeners for 'timeout'.

PR-URL: https://github.com/nodejs/node/pull/29200
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-08-31 18:41:41 +02:00
Brian White
98b718572f
stream: improve read() performance
PR-URL: https://github.com/nodejs/node/pull/29337
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-30 23:39:26 -04:00
Daniel Bevenius
25d59cf83a build: hard code doctool in test-doc target
This commit removes the usage of the CI_DOC variable in the test-doc
recipe and specifies the doctool argument to tools/test.py explicitly.

The motivation for this is that the build is taking longer time and
this is mostly due to tests being run twice as the CI_DOC
variable will be empty in most cases (when not using --without-ssl).

This change was introduced with/after Commit
9039af83a3 ("build: skip test-ci doc
targets if no crypto") and while I though it might make sense to change
the setting of CI_DOC I not sure about the implications that might have
to our CI environment. It currently looks like this:

ifeq ($(node_use_openssl), false)
        CI_DOC := doctool
else
        CI_DOC =
endif

Which is setting CI_DOC to doctool if there is no crypto support which
not available. But perhaps this should be be the other way around,
changing the order or updating condition to be true.

PR-URL: https://github.com/nodejs/node/pull/29375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-30 18:23:22 -07:00
Rich Trott
9e52654fd4 test: remove Windows skipping of http keepalive request GC test
Remove code to skip Windows in test-http-server-keepalive-req-gc. The
test now works reliably on Windows (I think).

PR-URL: https://github.com/nodejs/node/pull/29354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-30 07:16:19 -07:00
Benjamin Coe
8f33053dbf
deps: V8: cherry-pick 597f885
Original commit message:

    [coverage] Deterministically sort collected shared function infos

    Prior to this CL, collected shared function infos with identical
    source ranges were sorted non-deterministically during coverage
    collection. This lead to non-deterministically incorrectly-reported
    coverage due to an optimization which depended on the sort order later
    on.

    With this CL, we now sort shared function infos by the source range
    *and* call count.

    Bug: v8:6000,v8:9212
    Change-Id: If8bf900727591e71dbd0df621e472a4303f3a353
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771776
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63411}

Refs: 597f885eaa

PR-URL: https://github.com/nodejs/node/pull/29367
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-30 07:03:49 -07:00
Michaël Zasso
858db73a74 deps: patch V8 to 7.7.299.8
PR-URL: https://github.com/nodejs/node/pull/29336
Refs: https://github.com/v8/v8/compare/7.7.299.4...7.7.299.8
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-08-30 07:43:44 +02:00
Kamat, Trivikram
c746ba4982 doc,crypto: add extends for derived classes
PR-URL: https://github.com/nodejs/node/pull/29302
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-29 15:19:06 -07:00
David Carlier
ecd98428b0 doc: add devnexen to collaborators
PR-URL: https://github.com/nodejs/node/pull/29370
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-29 21:40:44 +01:00
Nick Schonning
1d5186e657 doc: inconsistent indentation for list items
Items at same level should have consistent indentation level.
Addresses Markdownlint MD005 errors.

PR-URL: https://github.com/nodejs/node/pull/29330
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-28 22:48:12 -07:00
Nick Schonning
9e8edb0d79 doc: heading levels should only increment by one
These are flagged by Markdownlint MD001 rule.

PR-URL: https://github.com/nodejs/node/pull/29331
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-28 22:47:21 -07:00
Shelley Vohr
17a697c794
crypto: don't expose openssl internals
PR-URL: https://github.com/nodejs/node/pull/29325
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-08-29 10:12:58 +05:30
David Carlier
8675152f0f build: integrate DragonFlyBSD into gyp build
PR-URL: https://github.com/nodejs/node/pull/29313
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-29 06:09:05 +02:00
Anna Henningsen
a194eacc96 util: do not throw when inspecting detached ArrayBuffer
PR-URL: https://github.com/nodejs/node/pull/29318
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>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2019-08-29 05:52:05 +02:00
Brian White
5dc5cfba7d
buffer: correct indexOf() error message
PR-URL: https://github.com/nodejs/node/pull/29217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-28 15:13:51 -04:00
Brian White
bb1af6c82f
buffer: consolidate encoding parsing
PR-URL: https://github.com/nodejs/node/pull/29217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-28 15:13:38 -04:00
Rich Trott
167960f3ca test: fix test-benchmark-net
Fix test-benchmark-net to accommodate recent benchmark additions.

PR-URL: https://github.com/nodejs/node/pull/29359
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-28 09:48:27 -07:00
cjihrig
403dacf9ce
tools: update ESLint to 6.2.2
Update ESLint to 6.2.2

PR-URL: https://github.com/nodejs/node/pull/29320
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2019-08-28 10:17:26 -04:00
cjihrig
0259aadc5a
tools: update babel-eslint to 10.0.3
PR-URL: https://github.com/nodejs/node/pull/29320
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2019-08-28 10:17:12 -04:00
Brian White
248e9ec124
querystring: improve performance
PR-URL: https://github.com/nodejs/node/pull/29306
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-08-28 03:12:11 -04:00
Rich Trott
3ae6f5e116 test: fix flaky test-http-server-keepalive-req-gc
Use `server` to keep the event loop open until the `ongc` listener runs.

PR-URL: https://github.com/nodejs/node/pull/29347
Fixes: https://github.com/nodejs/node/issues/29344
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-08-28 06:04:50 +02:00
Brian White
34961c7b5f
process: improve nextTick performance
PR-URL: https://github.com/nodejs/node/pull/25461
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-27 22:14:15 -04:00
Matheus Marchini
01504904f3
src: allow --interpreted-frames-native-stack in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/27744
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
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>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-08-27 15:59:06 -07:00
cjihrig
c246f813f8 errors: provide defaults for unmapped uv errors
libuv does not map 100% of errors. When an unmapped error is
encountered, the Map returns undefined, which is then
unsuccessfully destructured, causing an exception. This commit
adds a default value in the event of an unmapped error.

PR-URL: https://github.com/nodejs/node/pull/29288
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-08-27 11:27:33 -07:00
Brian White
5ba3a2c4b6 events: improve once() performance
PR-URL: https://github.com/nodejs/node/pull/29307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@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: Yongsheng Zhang <zyszys98@gmail.com>
2019-08-27 20:06:09 +08:00
Joyee Cheung
f96f9fbe31 build: make --without-snapshot imply --without-node-snapshot
PR-URL: https://github.com/nodejs/node/pull/29294
Fixes: https://github.com/nodejs/node/issues/29243
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-27 06:58:20 +02:00
cclauss
bfa2683eb6 build: test Python 3.6 and 3.7 on Travis CI
PR-URL: https://github.com/nodejs/node/pull/29291
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-08-26 21:33:07 -07:00
cclauss
4662f67e38 tools: fix Python 3 issues in inspector_protocol
PR-URL: https://github.com/nodejs/node/pull/29296
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-26 21:31:08 -07:00
Christian Clauss
b2cce432f3 test: use print() function in both Python 2 and 3
PR-URL: https://github.com/nodejs/node/pull/29298
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-26 21:30:01 -07:00
Kamat, Trivikram
fd964de1b7 doc,fs: add extends for derived classes
PR-URL: https://github.com/nodejs/node/pull/29304
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-26 19:22:20 -07:00
Kamat, Trivikram
5c9209bc4d doc,errors: add extends to derived classes
PR-URL: https://github.com/nodejs/node/pull/29303
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-26 18:49:41 -07:00
Samuel Attard
33ae95c58d src: expose MaybeInitializeContext to allow existing contexts
Splits the node.js specific tweak intialization of NewContext into a new
helper MaybeInitializeContext so that embedders with existing contexts
can still use them in a Node.js Environment now that primordials are
initialized and required so early.

Update MaybeInitializeContext to return MaybeLocal,

PR-URL: https://github.com/nodejs/node/pull/28544
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-26 18:24:10 -07:00
Michaël Zasso
d770b8a931
2019-08-26, Version 12.9.1 (Current)
Notable changes:

This release fixes two regressions in the http module:

* Fixes an event listener leak in the HTTP client. This resulted in lots
  of warnings during npm/yarn installs.
  https://github.com/nodejs/node/pull/29245
* Fixes a regression preventing the `'end'` event from being emitted for
  keepalive requests in case the full body was not parsed.
  https://github.com/nodejs/node/pull/29263

PR-URL: https://github.com/nodejs/node/pull/29321
2019-08-26 20:36:17 +02:00
Myles Borins
a9512bd000 doc: add dco to github pr template
Our project relies on the Developer Certificate of Origin as a passive
alternative to a Contributor License Agreement. The PR template seems
like a great place to surface the text to help new contributors be
aware of the DCO and it's implications.

PR-URL: https://github.com/nodejs/node/pull/24023
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-08-26 09:52:50 -07:00
Anna Henningsen
6ab28486c3
http: reset parser.incoming when server request is finished
This resolves a memory leak for keep-alive connections and does not
regress in the way that 779a05d5d1 did by waiting for
the incoming request to be finished before releasing the
`parser.incoming` object.

Refs: https://github.com/nodejs/node/pull/28646
Refs: https://github.com/nodejs/node/pull/29263
Fixes: https://github.com/nodejs/node/issues/9668

PR-URL: https://github.com/nodejs/node/pull/29297
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-08-26 15:22:04 +02:00
ran
698a29420f
stream: fix readable state awaitDrain increase in recursion
PR-URL: https://github.com/nodejs/node/pull/27572
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-26 15:20:50 +02:00
cjihrig
627bf59e8d lib: consolidate lazyErrmapGet()
There are currently two implementations of this function.
This commit removes the redundancy, and removes "lazy" from
the name.

PR-URL: https://github.com/nodejs/node/pull/29285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-25 16:10:07 -07:00
Xavier Stouder
66043e1812
console: display timeEnd with suitable time unit
When timeEnd function is called, display result with a suitable
time unit instead of a big amount of milliseconds.

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

PR-URL: https://github.com/nodejs/node/pull/29251
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-25 16:39:18 +02:00
Matteo Collina
b3172f834f test, http: add regression test for keepalive 'end' event
This test covers a regression where 'end' was not emitted in the case
of keepalive requests without parsing the full body.

PR-URL: https://github.com/nodejs/node/pull/29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-24 09:56:23 -07:00