James M Snell
aee3e2bc4c
src: various minor improvements to node_url
...
Went hunting for possible performance improvements. Didn't find
anything significant but did manage to make a number of style
improvements that bring more in line with style guidelines and
good pratice.
PR-URL: https://github.com/nodejs/node/pull/31651
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-02-07 23:29:43 +01:00
Tobias Nießen
2db1c8df25
doc: update TSC name in "Release Process"
...
PR-URL: https://github.com/nodejs/node/pull/31652
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-07 23:27:11 +01:00
Anna Henningsen
a555be2e45
worker: improve MessagePort performance
...
Use a JS function as the single entry point for emitting `.onmessage()`
calls, avoiding the overhead of manually constructing each message
event object in C++.
confidence improvement accuracy (*) (**) (***)
worker/echo.js n=100000 sendsPerBroadcast=1 payload='object' workers=1 *** 16.34 % ±1.16% ±1.54% ±1.99%
worker/echo.js n=100000 sendsPerBroadcast=1 payload='string' workers=1 *** 24.41 % ±1.50% ±1.99% ±2.58%
worker/echo.js n=100000 sendsPerBroadcast=10 payload='object' workers=1 *** 26.66 % ±1.54% ±2.05% ±2.65%
worker/echo.js n=100000 sendsPerBroadcast=10 payload='string' workers=1 *** 32.72 % ±1.60% ±2.11% ±2.73%
worker/messageport.js n=1000000 payload='object' *** 40.28 % ±1.48% ±1.95% ±2.52%
worker/messageport.js n=1000000 payload='string' *** 76.95 % ±2.19% ±2.90% ±3.75%
Also fix handling exceptions returned from `MessagePort::New`.
PR-URL: https://github.com/nodejs/node/pull/31605
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-07 11:01:59 -10:00
Joyee Cheung
e2a3a87060
doc: remove .github/ISSUE_TEMPLATE.md in favor of the template folder
...
This removes the obsolete issue template file since we already
have the issue template folder which is the one currently in effect.
PR-URL: https://github.com/nodejs/node/pull/31656
Refs: https://github.com/nodejs/node/pull/31611
Reviewed-By: Rich Trott <rtrott@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: Colin Ihrig <cjihrig@gmail.com >
2020-02-07 08:03:13 -10:00
Swagat Konchada
a733c18e28
doc: add note in BUILDING.md about running make distclean
...
Fixes: https://github.com/nodejs/node/issues/28675
PR-URL: https://github.com/nodejs/node/pull/31542
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-07 08:01:27 -10:00
Ruben Bridgewater
f9a27ea510
readline: make tab size configurable
...
This adds the `tabSize` option to readline to allow different tab
sizes.
PR-URL: https://github.com/nodejs/node/pull/31318
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-07 12:38:04 +01:00
tsabolov
10d378e947
doc: correct getting an ArrayBuffer's length
...
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.
PR-URL: https://github.com/nodejs/node/pull/31632
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-07 12:06:42 +01:00
Rich Trott
1d369a2031
test: add test-dns-promises-lookupService
...
This adds covereage for the onlookupservice() callback in
lib/internal/dns/promises.js. Because of stubbing in other tests, it is
not currently covered.
This test works on my local development machine with the network turned
off, so I'm putting it in parallel. If CI proves more challenging, it
can be moved to the internet directory instead.
PR-URL: https://github.com/nodejs/node/pull/31640
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-02-06 21:06:13 -10:00
Richard Lau
d213f21c72
tools: unify make-v8.sh for ppc64le and s390x
...
Refactor `tools/make-v8.sh` to minimise differences between the
`ppc64le` and `s390x` paths to allow us to enable `ccache` on the
`ppc64le` machines in the CI.
PR-URL: https://github.com/nodejs/node/pull/31628
Refs: https://github.com/nodejs/build/pull/1927
Refs: https://github.com/nodejs/build/issues/1940
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-02-06 19:51:31 -05:00
Gabriel Schulhof
884e287199
n-api: free instance data as reference
...
Instance data associated with a `napi_env` is no longer stored on the
env itself but is instead rendered as a reference. Since
`v8impl::Reference` is tied to a JS object, this modification factors
out the `v8impl::Reference` refcounting and the deletion process into
a base class for `v8impl::Reference`, called `v8impl::RefBase`. The
instance data is then stored as a `v8impl::RefBase`, along with other
references, preventing a segfault that arises from the fact that, up
until now, upon `napi_env` destruction, the instance data was freed
after all references had already been forcefully freed. If the addon
freed a reference during the `napi_set_instance_data` finalizer
callback, such a reference had already been freed during environment
teardown, causing a double free.
Re: https://github.com/nodejs/node-addon-api/pull/663
PR-URL: https://github.com/nodejs/node/pull/31638
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-02-06 12:43:24 -08:00
Rich Trott
a9e26268f5
doc,assert: rename "mode" to "assertion mode"
...
Rename "strict mode" in the assert module to "strict assertion mode".
This is to avoid confusion with the more typical meaning of "strict
mode" in ECMAScript.
This necessitates a corresponding change of "legacy mode" to "legacy
assertion mode".
PR-URL: https://github.com/nodejs/node/pull/31635
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 10:00:37 -10:00
Sam Roberts
efd5a6b2ed
test: using TE to smuggle reqs is not possible
...
See: https://hackerone.com/reports/735748
PR-URL: https://github.com/nodejs-private/node-private/pull/199
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-02-06 15:22:51 +01:00
Beth Griggs
4c5b8dd7d8
deps: update llhttp to 2.0.4
...
PR-URL: https://github.com/nodejs-private/node-private/pull/199
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-02-06 15:22:50 +01:00
Fedor Indutny
861d3f7a61
crypto: fix assertion caused by unsupported ext
...
`X509V3_EXT_print` can return value different from `1` if the X509
extension does not support printing to a buffer. Instead of failing with
an unrecoverable assertion - replace the relevant value in the hashmap
with a JS null value.
Fixes: https://hackerone.com/reports/746733
PR-URL: https://github.com/nodejs-private/node-private/pull/175
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-02-06 15:22:50 +01:00
Sam Roberts
fe3975783c
http: strip trailing OWS from header values
...
HTTP header values can have trailing OWS, but it should be stripped. It
is not semantically part of the header's value, and if treated as part
of the value, it can cause spurious inequality between expected and
actual header values.
Note that a single SPC of leading OWS is common before the field-value,
and it is already handled by the HTTP parser by stripping all leading
OWS. It is only the trailing OWS that must be stripped by the parser
user.
header-field = field-name ":" OWS field-value OWS
; https://tools.ietf.org/html/rfc7230#section-3.2
OWS = *( SP / HTAB )
; https://tools.ietf.org/html/rfc7230#section-3.2.3
Fixes: https://hackerone.com/reports/730779
PR-URL: https://github.com/nodejs-private/node-private/pull/189
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 15:22:50 +01:00
Sam Roberts
f8e7551295
benchmark: support optional headers with wrk
...
wrk did not support sending optional headers, they were silently
ignored. This appears to be an oversight, they were supported for
autocannon.
PR-URL: https://github.com/nodejs-private/node-private/pull/189
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 15:22:49 +01:00
Anna Henningsen
06a43d4dca
test: fix flaky test-http2-stream-destroy-event-order
...
Alternative to https://github.com/nodejs/node/pull/31590 .
It appears that the issue here is that the test falsely assumed that
closing the client (which also currently destroys the socket rather
than gracefully shutting down the connection) would still leave
enough time for the server side to receive the stream error.
Address that by explicitly waiting for the server side to receive the
stream error before closing the client and the connection with it.
Refs: https://github.com/nodejs/node/pull/31590
Refs: https://github.com/nodejs/node/issues/20750
PR-URL: https://github.com/nodejs/node/pull/31610
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 04:06:56 -10:00
James M Snell
e001710219
meta: fix collaborator list errors in README.md
...
Add missing `-` characters in the list.
PR-URL: https://github.com/nodejs/node/pull/31655
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-02-05 18:28:52 -10:00
Beth Griggs
d602e586bf
2020-02-06, Version 10.19.0 'Dubnium' (LTS)
...
This is a security release.
Vulnerabilities fixed:
* **CVE-2019-15606**:
HTTP header values do not have trailing OWS trimmed.
* **CVE-2019-15605**:
HTTP request smuggling using malformed Transfer-Encoding header.
* **CVE-2019-15604**:
Remotely trigger an assertion on a TLS server with a malformed
certificate string.
Also, HTTP parsing is more strict to be more secure. Since this may
cause problems in interoperability with some non-conformant HTTP
implementations, it is possible to disable the strict checks with the
`--insecure-http-parser` command line flag, or the `insecureHTTPParser`
http option. Using the insecure HTTP parser should be avoided.
PR-URL: https://github.com/nodejs-private/node-private/pull/198
2020-02-06 03:05:04 +00:00
Beth Griggs
e65ae42785
2020-02-06, Version 12.15.0 'Erbium' (LTS)
...
This is a security release.
Vulnerabilities fixed:
* **CVE-2019-15606**:
HTTP header values do not have trailing OWS trimmed.
* **CVE-2019-15605**:
HTTP request smuggling using malformed Transfer-Encoding header.
* **CVE-2019-15604**:
Remotely trigger an assertion on a TLS server with a malformed
certificate string.
Also, HTTP parsing is more strict to be more secure. Since this may
cause problems in interoperability with some non-conformant HTTP
implementations, it is possible to disable the strict checks with the
`--insecure-http-parser` command line flag, or the `insecureHTTPParser`
http option. Using the insecure HTTP parser should be avoided.
PR-URL: https://github.com/nodejs-private/node-private/pull/197
2020-02-06 02:55:47 +00:00
Beth Griggs
f0f2583c91
2020-02-06, Version 13.8.0 (Current)
...
This is a security release.
Vulnerabilities fixed:
* **CVE-2019-15606**:
HTTP header values do not have trailing OWS trimmed.
* **CVE-2019-15605**:
HTTP request smuggling using malformed Transfer-Encoding header.
* **CVE-2019-15604**:
Remotely trigger an assertion on a TLS server with a malformed
certificate string.
Also, HTTP parsing is more strict to be more secure. Since this may
cause problems in interoperability with some non-conformant HTTP
implementations, it is possible to disable the strict checks with the
`--insecure-http-parser` command line flag, or the `insecureHTTPParser`
http option. Using the insecure HTTP parser should be avoided.
PR-URL: https://github.com/nodejs-private/node-private/pull/196
2020-02-06 02:39:39 +00:00
Joyee Cheung
0effc9845f
doc: ask more questions in the bug report template
...
Inspired by the defect report template of the V8 issue tracker
PR-URL: https://github.com/nodejs/node/pull/31611
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-02-06 10:18:05 +08:00
James M Snell
ab4115f17c
os: move tmpDir() to EOL
...
The tmpDir alias was deprecated in 7.0.0
PR-URL: https://github.com/nodejs/node/pull/31169
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-02-05 17:50:42 -08:00
James M Snell
ec0dd6fa1c
lib: move GLOBAL and root aliases to EOL
...
GLOBAL and root have been long deprecated.
PR-URL: https://github.com/nodejs/node/pull/31167
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-02-05 17:48:08 -08:00
James M Snell
bffa5044c5
crypto: move pbkdf2 without digest to EOL
...
API has been being incrementally deprecated since 6.0.0
PR-URL: https://github.com/nodejs/node/pull/31166
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-02-05 17:41:19 -08:00
James M Snell
907c07fa85
stream: move _writableState.buffer to EOL
...
API was deprecated back in the 0.11 days.
PR-URL: https://github.com/nodejs/node/pull/31165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2020-02-05 17:35:56 -08:00
Conor ONeill
7e911d8b03
doc: add example to fs.promises.readdir
...
PR-URL: https://github.com/nodejs/node/pull/31552
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-05 16:12:45 +01:00
Anna Henningsen
c1da4e4aa4
src: fix inspecting MessagePort from init async hook
...
During the `init()` async hook, the C++ object is not finished
creating yet (i.e. it is an `AsyncWrap`, but not yet a `HandleWrap`
or `MessagePort`). Accessing the `handle_` field is not valid
in that case.
However, the custom inspect function for `MessagePort`s calls
`HasRef()` on the object, which would crash when the object
is not fully constructed. Fix that by guarding the access of
the libuv handle on that condition.
PR-URL: https://github.com/nodejs/node/pull/31600
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-05 15:51:31 +01:00
Robert Nagy
234de6f1fd
stream: fix finished w/ 'close' before 'finish'
...
Emitting 'close' before 'finish' on a Writable should
result in a premature close error.
PR-URL: https://github.com/nodejs/node/pull/31534
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-05 15:48:54 +01:00
Anna Henningsen
6a6279ef2a
doc: add AsyncResource + Worker pool example
...
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.
PR-URL: https://github.com/nodejs/node/pull/31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-02-05 15:40:17 +01:00
Ruben Bridgewater
1fb4bd1fc4
test: abstract common assertions in readline-interface test
...
PR-URL: https://github.com/nodejs/node/pull/31423
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-05 13:59:54 +01:00
Ruben Bridgewater
f295ba5d2c
test: refactor test-readline-interface.js
...
This reduces the code lines required to run the tests by abstracting
the constructor call. It also moves tests out of a for loop that
where miss placed.
PR-URL: https://github.com/nodejs/node/pull/31423
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-05 13:59:52 +01:00
Juan José Arboleda
afe353061b
doc: fs.write is not longer coercing strings
...
PR-URL: https://github.com/nodejs/node/pull/31030
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-02-05 13:40:03 +01:00
Ruben Bridgewater
fb6df3bfac
fs: validate the input data to be of expected types
...
The input was not validated so far and that caused unwanted side
effects. E.g., `undefined` became the string `'undefined'`. It was
expected to fail or to end up as empty string.
Now all input is validated to be either some type of array buffer
view or a string. That way it's always clear what the user intents.
PR-URL: https://github.com/nodejs/node/pull/31030
Fixes: https://github.com/nodejs/node/issues/31025
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-02-05 13:39:53 +01:00
James M Snell
2d8febceef
fs: deprecate closing FileHandle on garbage collection
...
Closing the FileHandle on garbage collection is a bad practice.
Runtime deprecate and indicate that an error will be thrown in
the future.
PR-URL: https://github.com/nodejs/node/pull/28396
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-04 18:29:06 -08:00
Kirill Fomichev
018c3e8949
perf_hooks: add property flags to GCPerformanceEntry
...
PR-URL: https://github.com/nodejs/node/pull/29547
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2020-02-04 17:41:44 +01:00
Anna Henningsen
60de60a0ce
src: remove unused Worker::child_port_ member
...
This fixes a compiler warning introduced in 9225939528 .
PR-URL: https://github.com/nodejs/node/pull/31599
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-02-04 07:02:34 +01:00
Rusty Conover
ee9e689df2
net: track state of setNoDelay() and prevent unnecessary system calls
...
The state of .setNoDelay() is now tracked and code will prevent repeated
system calls to setsockopt() when the value has already been set to the
desired value for the socket.
Change and expand the appropriate test.
PR-URL: https://github.com/nodejs/node/pull/31543
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-03 15:15:24 -08:00
bcoe
3f70d77203
fs: set path when mkdir recursive called on file
...
PR-URL: https://github.com/nodejs/node/pull/31607
Fixes: https://github.com/nodejs/node/issues/28015
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-02-03 14:32:20 -08:00
Anna Henningsen
d435dc47f3
test: unset NODE_OPTIONS for cctest
...
The test may fail otherwise because of behaviour changes caused
by setting the environment variable.
Fixes: https://github.com/nodejs/node/issues/31585
PR-URL: https://github.com/nodejs/node/pull/31594
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-03 12:11:06 -08:00
ConorDavenport and Rich Trott
d4660aba63
src: change Fill() to use ParseArrayIndex()
...
Changed Fill() to use ParseArrayIndex() when getting start and end
of buffers instead of Uint32Value, supporting buffers of greater
than 2**32
Fixes: https://github.com/nodejs/node/issues/31514
Co-Authored-By: Rich Trott <rtrott@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/31591
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-03 12:00:41 -08:00
Guy Bedford
0f96dc266f
esm: import.meta.resolve with nodejs: builtins
...
PR-URL: https://github.com/nodejs/node/pull/31032
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2020-02-03 18:31:02 +02:00
Anna Henningsen
875a4d1a58
worker: add ability to take heap snapshot from parent thread
...
PR-URL: https://github.com/nodejs/node/pull/31569
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-03 07:04:13 -08:00
Denys Otrishko
f7a1ef6fb5
benchmark: clean up config resolution in multiple benchmarks
...
This removes 'to Number' casting in multiple benchmarks (which is
handled by the benchmark runner) and cleans up some var usage in changed
benchmarks.
PR-URL: https://github.com/nodejs/node/pull/31581
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-02 19:45:02 -08:00
Sam Roberts
dbaa4ca166
test: simplify test-https-simple.js
...
It had an unused `Agent` option (no such option exists), and some code
that common.must(Not)Call makes redundant.
PR-URL: https://github.com/nodejs/node/pull/31584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-02 19:43:36 -08:00
ConorDavenport
99c8c6d80f
src: remove duplicate field env in CryptoJob class
...
Removed field env from cryptojob class, replaced with
function env() inherited from ThreadPoolWork
PR-URL: https://github.com/nodejs/node/pull/31554
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-02-02 09:06:42 -08:00
Denys Otrishko
aec9ad8f6c
src: fix console debug output on Windows
...
The FWrite function on Windows assumed that MultiByteToWideChar
automatically null-terminates the resulting string, but it will only do
so if the size of the source was passed as -1 or null character was
explicitly counted in the size. The FWrite uses std::string and its
`.size()` method which doesn't count the null character even though the
`.data()` method adds it to the resulting string.
https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#remarks
> MultiByteToWideChar does not null-terminate an output string if the
input string length is explicitly specified without a terminating null
character. To null-terminate an output string for this function, the
application should pass in -1 or explicitly count the terminating null
character for the input string.
PR-URL: https://github.com/nodejs/node/pull/31580
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-02 14:12:23 +01:00
Ben Noordhuis
dbe881b64c
test: show child stderr output in largepages test
...
The test starts child processes. A recent change is suspected of causing
flaky crashes on one of the alpine buildbots but we can't know for sure
because the test hides the child's stderr.
Refs: https://github.com/nodejs/node/pull/31547#issuecomment-581076515
PR-URL: https://github.com/nodejs/node/pull/31612
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-02 13:41:37 +01:00
Anna Henningsen
9528f95336
test: mark additional tests as flaky on Windows
...
Basically, any of the tests that failed in the runs for
https://github.com/nodejs/node/pull/31602 which was not already
marked as flaky.
PR-URL: https://github.com/nodejs/node/pull/31606
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-02-01 22:58:56 +01:00
Anna Henningsen
06deb94714
test: fix flaky test-memory-usage
...
abe6a2e3d1 introduced a test that verifies that ArrayBuffer
allocations are tracked. However, V8 supports concurrent freeing
of such allocations on background threads, meaning that the results
may be subject to race conditions sometimes.
Disabling concurrent freeing makes the test pass consistently.
Refs: https://github.com/nodejs/node/pull/31550
PR-URL: https://github.com/nodejs/node/pull/31602
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-01 21:15:40 +01:00