cjihrig
734323d9eb
buffer: stop alloc() uninitialized memory return
...
CVE-2018-7166
Discovered by ChALkeR - Сковорода Никита Андреевич
Prevent Buffer.alloc(size, fill, number) from returning uninitialized memory.
Fixes: https://github.com/nodejs-private/security/issues/202
PR-URL: https://github.com/nodejs-private/node-private/pull/137
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-08-15 20:23:17 +10:00
Rod Vagg
2c4c17b708
buffer: avoid overrun on UCS-2 string write
...
CVE-2018-12115
Discovered by ChALkeR - Сковорода Никита Андреевич
Fix by Anna Henningsen
Writing to the second-to-last byte with UCS-2 encoding will cause a -1
length to be send to String::Write(), writing all of the provided Buffer
from that point and beyond.
Fixes: https://github.com/nodejs-private/security/issues/203
PR-URL: https://github.com/nodejs-private/node-private/pull/138
2018-08-15 20:23:17 +10:00
Vse Mozhet Byt
9d89b3c7ec
test: rename some allegories
...
PR-URL: https://github.com/nodejs/node/pull/22307
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-08-15 20:23:17 +10:00
James M Snell
7223a91a50
http2: explicitly disallow nested push streams
...
Fixes: https://github.com/nodejs/node/issues/19095
PR-URL: https://github.com/nodejs/node/pull/22245
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-15 20:23:17 +10:00
Ouyang Yadong
a7dad4565b
test: move test-http-client-timeout-option-with-agent to sequential
...
The timeout event cannot be precisely timed and the actual timeout
may be longer in some situations. Here we move this test into the
sequential folder to make it happens less likely.
PR-URL: https://github.com/nodejs/node/pull/22083
Fixes: https://github.com/nodejs/node/issues/22041
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-15 20:23:17 +10:00
Ruben Bridgewater
1c577016b8
benchmark: improve assert benchmarks
...
This reduces the runtime and makes sure the strict and loose options
can be tested individually.
Besides that a couple of redundant cases were removed.
PR-URL: https://github.com/nodejs/node/pull/22211
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-15 20:23:17 +10:00
Shigeki Ohtsu
01fe2cee5b
test: fix error messages for OpenSSL-1.1.0i
...
After upgradeing OpenSSL-1.1.0i, two tests are failed due to changes
of error messages.
Ref: https://github.com/openssl/openssl/commit/45ae18b38401a027f231f1408e71b13ff3111021
Ref: https://github.com/openssl/openssl/commit/36d2517a97f6020049116492b4d5491d177e629c
PR-URL: https://github.com/nodejs/node/pull/22318
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 20:23:17 +10:00
Ruben Bridgewater
c145690aad
test: improve test coverage for comparisons
...
PR-URL: https://github.com/nodejs/node/pull/22212
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@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 >
2018-08-15 20:23:17 +10:00
Ruben Bridgewater
f1c22eaa56
util,assert: fix boxed primitives bug
...
Currently the comparison could throw an error in case a boxed
primitive has no valueOf function on one side of the assert call.
PR-URL: https://github.com/nodejs/node/pull/22243
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-15 20:23:17 +10:00
Anatoli Papirovski
2d1c1853e9
tls: remove SLAB_BUFFER_SIZE
...
This constant has not been in use for many years now and the test
alongside it is invalid, as well as flaky.
PR-URL: https://github.com/nodejs/node/pull/21199
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-15 20:23:17 +10:00
Ruben Bridgewater
b171fa2530
util: improve display of iterators and weak entries
...
This adds the number of not visible elements when inspecting iterators
while exceeding `maxArrayLength`.
It also fixes a edge case with `maxArrayLength` and the map.entries()
iterator. Now the whole entry will be visible instead of only the key
but not the value of the first entry.
Besides that it uses a slighly better algorithm that improves the
performance by skipping unnecessary steps.
PR-URL: https://github.com/nodejs/node/pull/20961
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-15 20:23:17 +10:00
Ruben Bridgewater
58a9ae118e
assert: fix loose assert with map and set
...
There was an oversight when checking the possible loose comparisons.
This is now fixed by also accepting `''` instead of `0` or `false`.
PR-URL: https://github.com/nodejs/node/pull/22145
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-15 20:23:17 +10:00
James M Snell
fcca2f7e49
http2: remove streamError from docs
...
`streamError` was removed quite some time ago but the docs and
code comments weren't updated. Fix that.
Fixes: https://github.com/nodejs/node/issues/20211
PR-URL: https://github.com/nodejs/node/pull/22246
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-15 20:23:17 +10:00
Jon Moss
86ab2c041e
crypto: remove unused SSLWrap handle methods
...
One was not used at all, and the other was only used in a test, which I
converted to use the more standard `ShutdownWrap` API.
PR-URL: https://github.com/nodejs/node/pull/22216
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-15 20:23:17 +10:00
Rich Trott
bdc644f2ec
test: remove common.fileExists()
...
common.fileExists() can be replaced with fs.existsSync().
PR-URL: https://github.com/nodejs/node/pull/22151
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Jon Moss <me@jonathanmoss.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: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2018-08-15 20:23:17 +10:00
Ouyang Yadong
bc1cb7b7fc
test: handle errors correctly in GC http test
...
In test-gc-http-client-timeout.js, res.resume is not a function if error
occurs. Remove the error handler.
PR-URL: https://github.com/nodejs/node/pull/22185
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-08-15 20:23:17 +10:00
Musa Hamwala
cefc4a03cc
test: remove second arg from assert.ifError()
...
`test/parallel/test-fs-readfile.js` has a call to
`assert.ifError()` that receives two arguments.
There is no second argument used in `assert.ifError()`.
This PR removes this argument.
PR-URL: https://github.com/nodejs/node/pull/22190
Reviewed-By: George Adams <george.adams@uk.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-15 20:23:17 +10:00
Denys Otrishko
31e3e6f1f8
stream: fix readable behavior for highWaterMark === 0
...
Avoid trying to emit 'readable' due to the fact that
state.length is always >= state.highWaterMark if highWaterMark is 0.
Therefore upon .read(0) call (through .on('readable')) stream assumed
that it has enough data to emit 'readable' even though
state.length === 0 instead of issuing _read(). Which led to the TTY
not recognizing that someone is waiting for the input.
Fixes: https://github.com/nodejs/node/issues/20503
Refs: https://github.com/nodejs/node/pull/18372
PR-URL: https://github.com/nodejs/node/pull/21690
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-15 20:23:17 +10:00
Daniel Bevenius
b1cbbbc7af
test: move require of https to after crypto check
...
Currently when configured without-ssl test-request-arguments.js will
fail with a missing crypto message.
This commit moves the require of https to after the crypto check.
PR-URL: https://github.com/nodejs/node/pull/22148
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-08-15 20:23:17 +10:00
Daniel Bevenius
a6ab19a96a
test: move require of http2 to after crypto check
...
Currently when configured without-ssl test-heapdump-http2.js will fail
with a missing crypto message.
This commit moves the require of http2 to after the crypto check.
PR-URL: https://github.com/nodejs/node/pull/22148
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-08-15 20:23:17 +10:00
Richard Lau
5018661a85
test: remove common.fileExists()
...
test-trace-event-promises.js was added to the codebase between the last
CI for https://github.com/nodejs/node/pull/22151 and it landing.
PR-URL: https://github.com/nodejs/node/pull/22200
Refs: https://github.com/nodejs/node/pull/22151
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-08-15 20:23:17 +10:00
James M Snell
ad46cca104
trace_events: add node.promises category, rejection counter
...
Allow the trace event log to include a count of unhandled rejections
and handled after rejections. This is useful primarily as a quick
check to see if rejections may be going unhandled (and unnoticed
in a process).
PR-URL: https://github.com/nodejs/node/pull/22124
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-15 20:23:17 +10:00
Masashi Hirano
ca0fb3acce
test: check arg type for dnsPromises.resolve
...
PR-URL: https://github.com/nodejs/node/pull/22000
Reviewed-By: Anna Henningsen <anna@addaleax.net >
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 >
2018-08-15 20:23:17 +10:00
Fedor Indutny
e58c17b849
test: update certificates and private keys
...
The certificates in test fixtures were set to expire in 999 days since
they were generated. That time has passed, and they have to be reissued.
Bump expiration time to 99999 days for all of them to prevent this from
happening again in near future.
PR-URL: https://github.com/nodejs/node/pull/22184
Fixes: https://github.com/nodejs/node/issues/22182
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 20:23:17 +10:00
Anna Henningsen
2dc7f17e8b
crypto: add better scrypt option aliases
...
Make parameter names available in a human-readable way, for
more accessible/self-documenting usage of the `scrypt` functions.
This implements a review comment from the original PR that has
not been addressed.
Refs: https://github.com/nodejs/node/pull/20816#discussion_r189220776
PR-URL: https://github.com/nodejs/node/pull/21525
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-08-15 20:23:14 +10:00
Sam Ruby
2bf9a4a09e
https: allow url and options to be passed to https.request
...
PR-URL: https://github.com/nodejs/node/pull/22003
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/21880
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-07 08:50:58 +02:00
Sam Ruby
37369eba38
http: allow url and options to be passed to http*.request and http*.get
...
Fixes: https://github.com/nodejs/node/issues/20795
PR-URL: https://github.com/nodejs/node/pull/21616
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/21880
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-07 08:50:44 +02:00
Sam Ruby
e4f346892c
repl: support mult-line string-keyed objects
...
isRecoverableError is completely reimplemented using acorn and an
acorn plugin that examines the state of the parser at the time of the
error to determine if the code could be completed on a subsequent line.
PR-URL: https://github.com/nodejs/node/pull/21805
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-04 15:43:31 +02:00
Timothy Gu
6cff57e98d
test: fix incorrect file mode check
...
PR-URL: https://github.com/nodejs/node/pull/22023
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-04 15:43:31 +02:00
Benjamin Gruenbaum
dafaff3a5e
test: remove unused config
...
process.maxTickDepth was removed in v0.12 a whole while ago and was
mostly removed from our code base. There are still some places it was
left in old benchmarks and tests.
This PR removes setting the value in those tests and
benchmarks.
PR-URL: https://github.com/nodejs/node/pull/21985
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-04 15:43:31 +02:00
Rishabh Singh
a569ae4b44
test: remove third argument from assert.strictEqual()
...
In file test/parallel/test-stream-transform-final.js the ten calls to
assert.strictEqual() use a string literal as third argument. When
a AssertionError occurs, it reports the string literal and not the
first two arguments, so the third agrument is removed and made a
comment just above the call to assert.strictEqual().
PR-URL: https://github.com/nodejs/node/pull/22051
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-04 15:43:31 +02:00
Michael Sommer
a60060b499
test: remove third argument from call to assert.strictEqual()
...
PR-URL: https://github.com/nodejs/node/pull/22047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@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-08-02 22:10:07 +02:00
Oryan Moshe
246a94f301
test: see value of "hadError" in tls test
...
The existing implementation created a state that if the assert failed
we got an error message without the values of hadError.
Removed the default error message and added a comment explaining the
assert.
PR-URL: https://github.com/nodejs/node/pull/22069
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-02 22:10:07 +02:00
Anna Henningsen
0beffc0f3b
test: remove test/gc, integrate into parallel
...
There’s no reason to have a separate addon just for
testing GC anymore.
PR-URL: https://github.com/nodejs/node/pull/22001
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-01 21:36:55 +02:00
Eugene Ostroukhov
c2372eac16
test: add tracing crash regression test
...
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 21:36:43 +02:00
Anto Aravinth
52020dc09a
test: refactor test-http2-compat-serverresponse-finished.js
...
PR-URL: https://github.com/nodejs/node/pull/21929
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-01 21:31:50 +02:00
Michaël Zasso
8799f43fb0
http: revert "http: always emit close on req and res"
...
This reverts a commit that accidentally introduced a semver-major
change to Node 10 and broke userland code.
A subsequent fix to that change and documentation change are reverted
with it.
Revert "http: fix res emit close before user finish"
This reverts commit 2a9c83321b .
Revert "http: always emit close on req and res"
This reverts commit 8029a2473e .
Revert "doc: fix HTTP req/res 'close' description"
This reverts commit 8ab7ea6eed .
PR-URL: https://github.com/nodejs/node/pull/21809
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-08-01 17:22:35 +02:00
Gus Caplan
9a88fe4d5e
vm: rename vm.Module to vm.SourceTextModule
...
At the last TC39 meeting, a new type of Module Records backed by
JavaScript source called Dynamic Module Records was discussed, and
it is now at Stage 1. Regardless of whether that proposal makes it
all the way into the spec, SourceTextModule is indeed a more
descriptive and accurate name for what this class represents.
PR-URL: https://github.com/nodejs/node/pull/22007
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2018-08-01 14:15:30 +02:00
Ruben Bridgewater
62fd84528e
test: improve inspect readability
...
The string escaping is hard to read. This changes all those escaped
strings to use double quotes instead so no escaping is necessary.
PR-URL: https://github.com/nodejs/node/pull/21624
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-31 09:53:37 +02:00
shisama
4510ca349e
test: add tests for fs/promises chown functions
...
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().
PR-URL: https://github.com/nodejs/node/pull/20574
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-31 09:35:46 +02:00
Anna Henningsen
d91742aa9a
fs: reduce memory retention when streaming small files
...
Fixes: https://github.com/nodejs/node/issues/21967
PR-URL: https://github.com/nodejs/node/pull/21968
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-31 09:35:46 +02:00
James Ide
337b2df82f
http2: release request()'s "connect" event listener after it runs
...
The `Http2Session#request()` method internally listens to the "connect"
event if the session has not yet established a connection so that the
actual request can be sent after the connection has been established.
This commit removes the event listener after it runs and carries out
the request and is no longer needed. In practice this shouldn't affect
the behavior of the session object since the "connect" event fires only
once anyway, but removing the listener releases its references. The
rest of this class subscribes to the "connect" event with `once`
instead of `on` as well.
Tested by adding a new test that ensures `Http2Session#request()` is
called before the connection is established, indicated by a "connect"
listener that is run. The test also ensures all "connect" listeners are
removed after the connection is established.
PR-URL: https://github.com/nodejs/node/pull/21916
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-31 09:35:46 +02:00
cjihrig
98ef8cfb8e
dgram: make _createSocketHandle() internal only
...
_createSocketHandle() is used internally by the cluster module.
This commit makes it internal only API.
PR-URL: https://github.com/nodejs/node/pull/21923
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Wyatt Preul <wpreul@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-31 09:35:46 +02:00
cjihrig
ae17d18013
dgram: hide underscored Socket properties
...
dgram sockets have a fair number of exposed private properties.
This commit hides them all behind a single symbol property.
PR-URL: https://github.com/nodejs/node/pull/21923
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Wyatt Preul <wpreul@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-31 09:35:46 +02:00
Brian White
baf3027c77
lib: remove usc-2 encoding
...
Fixes: https://github.com/nodejs/node/issues/21963
PR-URL: https://github.com/nodejs/node/pull/21964
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-31 09:35:46 +02:00
Joyee Cheung
80b5c914bb
src: add proper MemoryInfoName to wrappers
...
- Use camel case names for memory retainers inherited from AsyncWrap
instead of their provider names (which are all in upper case)
- Assign class names to wraps so that they appear in the heap snapshot
as nodes with class names as node names. Previously some nodes are
named with reference names, which are supposed to be edge names
instead.
PR-URL: https://github.com/nodejs/node/pull/21939
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-07-31 09:35:46 +02:00
Anna Henningsen
4958501ac0
test: remove timeout from test-pipe-stream
...
The timeout is unnecessary and the suspected cause of the following
failure (even though I could not reproduce it locally):
11:53:54 not ok 197 parallel/test-pipe-stream
11:53:54 ---
11:53:54 duration_ms: 6.253
11:53:54 severity: fail
11:53:54 exitcode: 1
11:53:54 stack: |-
11:53:54 assert.js:338
11:53:54 throw err;
11:53:54 ^
11:53:54
11:53:54 AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
11:53:54
11:53:54 assert.ok(have_ping)
11:53:54
11:53:54 at check (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-pipe-stream.js:14:12)
11:53:54 at Server.<anonymous> (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-pipe-stream.js:61:5)
11:53:54 at Server.emit (events.js:182:13)
11:53:54 at emitCloseNT (net.js:1668:8)
11:53:54 at process._tickCallback (internal/process/next_tick.js:63:19)
(From https://ci.nodejs.org/job/node-test-binary-arm/2235/RUN_SUBSET=5,label=pi3-docker/console .)
PR-URL: https://github.com/nodejs/node/pull/21837
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-26 20:11:18 +02:00
sagulati
af6b82469d
test: fix unreliable test-fs-stat-bigint
...
Remove side-effects between testcases by creating a new file everytime.
Fixes: https://github.com/nodejs/node/issues/21948
PR-URL: https://github.com/nodejs/node/pull/21949
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-26 09:25:54 +02:00
Sam Ruby
793a5bb4af
test: don't fail http2 abort test if 'data' is called multiple times
...
PR-URL: https://github.com/nodejs/node/pull/21925
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@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: Matteo Collina <matteo.collina@gmail.com >
2018-07-26 09:25:54 +02:00
Rich Trott
623ef4961b
test: address flaky worker test
...
Make test/parallel/test-worker-message-port-transfer-closed.js more
reliable by counting ticks rather than using a single setTimeout().
Fixes: https://github.com/nodejs/node/issues/21892
PR-URL: https://github.com/nodejs/node/pull/21893
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
2018-07-26 09:25:54 +02:00