0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

22172 Commits

Author SHA1 Message Date
Vse Mozhet Byt
7588ceaf35 doc: add more missing backticks
Also, fix some other nits in passing
(formatting, punctuation, typos, redundancy, obsoleteness).

PR-URL: https://github.com/nodejs/node/pull/20438
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-03 02:12:07 +03:00
Gabriel Schulhof
bdf5be98dd n-api: test and doc napi_throw() of a primitive
Ensure that napi_throw() is able to throw a primitive value, and
document that it is able to throw any JavaScript value.

Fixes: https://github.com/nodejs/abi-stable-node/issues/309
PR-URL: https://github.com/nodejs/node/pull/20428
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 09:23:38 -04:00
Michaël Zasso
9c8b479467 deps: cherry-pick 76cab5f from upstream V8
Original commit message:

    Fix Object.entries/.values with non-enumerable properties

    Iterate over all descriptors instead of bailing out early and missing
    enumerable properties later.

    Bug: chromium:836145
    Change-Id: I104f7ea89480383b6b4b9204942a166bdf8e0597
    Reviewed-on: https://chromium-review.googlesource.com/1027832
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52786}

Refs: 76cab5ff78
Fixes: https://github.com/nodejs/node/issues/20278

PR-URL: https://github.com/nodejs/node/pull/20350
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-05-02 14:06:58 +02:00
Daniel Bevenius
557f5702ec http2: reduce require calls in http2/core
This commit removes unnecesary requires of http and internal/util in
http2/core.js

PR-URL: https://github.com/nodejs/node/pull/20422
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-02 08:37:05 +02:00
Daniel Bevenius
04f180122c http2: remove unnecessary v8 qualified names
This commit removes v8 qualified identifiers that have using directives
to be consistent with the rest of the code in node_http2.cc.

PR-URL: https://github.com/nodejs/node/pull/20420
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 08:26:25 +02:00
Daniel Bevenius
091f999507 http2: remove unused using declarations node_http2
PR-URL: https://github.com/nodejs/node/pull/20420
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 08:26:12 +02:00
Vse Mozhet Byt
392d80a617 doc: add missing periods or colons
Some other formatting nits were fixed
and some superfluous descriptions were simplified in passing.

PR-URL: https://github.com/nodejs/node/pull/20401
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 06:17:08 +03:00
Vse Mozhet Byt
536b1fbd3f doc: mitigate marked bug
PR-URL: https://github.com/nodejs/node/pull/20411
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 06:02:42 +03:00
Vse Mozhet Byt
aaca38a261 doc: specify types of listener parameter
We cannot manage with `{any}` because `message` cannot be
of `Symbol` or `undefined` types.

PR-URL: https://github.com/nodejs/node/pull/20405
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 05:55:23 +03:00
Vse Mozhet Byt
1c530e89ed tools: dedupe property access in doc/type-parser
There is no need to get this property twice in this rather hot spot:
if there is no such key, the `typeUrl` will be `undefined`,
which suffices for the boolean check in the next line.

For consistency, `undefined` can also be made the default value.

PR-URL: https://github.com/nodejs/node/pull/20387
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-02 05:50:01 +03:00
Rich Trott
64a37654ce doc: clarify FileHandle text
There is a paragraph about why the promise-based API uses `FileHandle`
rather than a numeric `fd`. Unfortunately, the paragraph is a bit of
word-salad. Edit it for clarity, grammar, and style.

PR-URL: https://github.com/nodejs/node/pull/20450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-01 15:48:04 -07:00
Rich Trott
a55c4fdeb1 doc: remove unclear text from fs.write()
There is a paragraph explaining that `fs.write()` cannot write a
substring of the provided string. It's not clear what `buffer` refers
to in that paragraph or even what the purpose of the paragraph is.
There's no suggestion elsewhere that `fs.write()` should be expected to
have a substring feature. Remove the paragraph.

PR-URL: https://github.com/nodejs/node/pull/20450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-01 15:47:59 -07:00
Rich Trott
f27566f0f2 doc: edit fs.createReadStream() highWaterMark
Shorten the text about the `highWaterMark` value for the stream returned
by `fs.createReadStream()`.

PR-URL: https://github.com/nodejs/node/pull/20450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-01 15:47:40 -07:00
Ayush Gupta
d3abb60b05 doc: remove redundant table of contents for N-API
Since the table of contents is built dynamically when
building the documentation, the additional table of
contents is redundant and an extra overhead to maintain.

PR-URL: https://github.com/nodejs/node/pull/20395
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-30 22:04:58 -07:00
Ujjwal Sharma
e954aa0e0c
doc: add parameters for settings events
Add parameters for the callback for the Http2Session:localSettings event
and Http2Session:remoteSettings event inline with the pattern in the
rest of the documentation.

Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464

PR-URL: https://github.com/nodejs/node/pull/20371
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-01 02:32:00 +05:30
Gabriel Schulhof
d3255cad8e n-api: document the look of napi_external values
Describe what JavaScript values of type `napi_external` look like in
JavaScript.

Fixes: https://github.com/nodejs/abi-stable-node/issues/306
PR-URL: https://github.com/nodejs/node/pull/20426
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-30 16:29:03 -04:00
Gabriel Schulhof
8062431491 n-api: document that native strings are copied
Mention that a copy is made of the native string by the
napi_create_string_* APIs.

Fixes: https://github.com/nodejs/abi-stable-node/issues/304
PR-URL: https://github.com/nodejs/node/pull/20425
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-30 16:25:45 -04:00
Gabriel Schulhof
20eaee5e18 doc: refine napi_get_property_names() doc
Document that only enumerable, string-keyed properties are returned.

Fixes: https://github.com/nodejs/abi-stable-node/issues/307
PR-URL: https://github.com/nodejs/node/pull/20427
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-30 14:00:05 -04:00
Rich Trott
ca80551640 doc: remove "has been known" tentativeness
Remove unnecessary "has been known to" tentativeness from
COLLABORATOR_GUIDE.md. "has been known to" is an awkward replacement for
"can" or "might" or "sometimes does" or "does". Pick the right one and
use it.

PR-URL: https://github.com/nodejs/node/pull/20412
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-30 10:44:39 -07:00
Myles Borins
c6d3b37650
2018-04-30, Version 6.14.2 'Boron' (LTS)
Notable Change:

* n-api:
  - n-api has been backported to v6.x. It is being landed as an experimental interface,
    and as such is landing in a Semver-Patch release. (Gabriel Schulhof)
    https://github.com/nodejs/node/pull/19447

PR-URL: https://github.com/nodejs/node/pull/19996
2018-04-30 13:42:22 -04:00
Tobias Nießen
0e63724fe1
crypto: use new OpenSSL constants in CipherBase
This change replaces some constants with better alternatives which were
unavailable in OpenSSL 1.0.2.

PR-URL: https://github.com/nodejs/node/pull/20339
Refs: https://github.com/nodejs/node/pull/19794
Refs: https://github.com/nodejs/node/pull/18138
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-30 18:44:10 +02:00
Ruben Bridgewater
109cfa1511
errors: minor (SystemError) refactoring
This removes the former default values and the spread arguments
usage. That was unnecessary and now it does only what is necessary.
The `message` function got renamed to `getMessage` to outline that
it is actually a function and a helper function was inlined into
the SystemError constructor as it was only used there.

PR-URL: https://github.com/nodejs/node/pull/20337
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-30 16:51:58 +02:00
Rich Trott
0deb27bd29
test: add dns memory error test
Add test that confirms that when libuv reports a memory error on a DNS
query, that the memory error is passed through and not replaced with
ENOTFOUND.

PR-URL: https://github.com/nodejs/node/pull/20317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-30 16:49:53 +02:00
Ruben Bridgewater
a158d412b3
dns: report out of memory properly
This addresses a part of a TODO by properly reporting an out of
memory error to the user instead of reporting `ENOTFOUND`.

PR-URL: https://github.com/nodejs/node/pull/20317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-30 16:49:52 +02:00
Anna Henningsen
283a967e35
src: avoid std::make_unique
Work around https://github.com/nodejs/build/issues/1254, which
effectively breaks stress test CI and CITGM, by avoiding
`std::make_unique` for now.

This workaround should be reverted once that issue is resolved.

Refs: https://github.com/nodejs/build/issues/1254

PR-URL: https://github.com/nodejs/node/pull/20386
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-04-29 23:42:42 +02:00
Rich Trott
45c7e03f40 doc: remove parenthetical in onboarding-extras
Remove "(I prefer the former)" from onboarding-extras. Without any
explanation as to why one might prefer A over B, it probably raises more
questions than it answers.

PR-URL: https://github.com/nodejs/node/pull/20393
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-29 09:16:05 -07:00
Julien Fontanet
9c48926dba
stream: fix error handling with async iteration
Fix an issue when an error was emitted by the stream before
`iterator.next()` is called.

PR-URL: https://github.com/nodejs/node/pull/20329
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-04-29 17:22:48 +02:00
Ben Noordhuis
a9051bb2c3
build: remove --xcode configure switch
`./configure --xcode` ostensibly let you built with the Xcode IDE but
it has never been tested regularly since its introduction in 2012 and
probably has been broken for years.  Remove it.

PR-URL: https://github.com/nodejs/node/pull/20328
Fixes: https://github.com/nodejs/node/issues/20324
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-04-29 17:20:49 +02:00
Ruben Bridgewater
541d2192cf
test: fix a TODO and remove obsolete TODOs
This removes outdated TODOs and adds a test for invalid input in
`fs.copyFile` and solves a TODO by doing so.

PR-URL: https://github.com/nodejs/node/pull/20319
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-29 17:17:14 +02:00
Ruben Bridgewater
29cddb40b2
test: verify arguments length in common.expectsError
If `common.expectsError` is used as a callback, it will now also
verify that there is only one argument (the expected error).

PR-URL: https://github.com/nodejs/node/pull/20311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-29 17:13:37 +02:00
Ruben Bridgewater
bb546ac001
http2: fix ping callback
In case there was no ack, the callback would have returned
more than the error as return value. This makes sure that is not
the case anymore.

PR-URL: https://github.com/nodejs/node/pull/20311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-29 17:13:37 +02:00
Ruben Bridgewater
b92c656302
doc: improve process event headers
The headers should be handled as all others as well and just indicate
all arguments.

PR-URL: https://github.com/nodejs/node/pull/20312
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-29 17:10:36 +02:00
Ruben Bridgewater
655430179f
doc: improve assert docs
This improves the error example output by reflecting the current
state. It also makes sure the examples are up to date in general.
`assert.throws` clarified the `ERR_AMBIGUOUS_ARGUMENT` error.

PR-URL: https://github.com/nodejs/node/pull/20313
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-29 17:08:49 +02:00
Ruben Bridgewater
8a0fb137d8
assert: make skipping indicator blue
If lines gets skipped, they are marked with three dots. This makes
sure they are better visualized to distinguish them from everything
else.

PR-URL: https://github.com/nodejs/node/pull/20315
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-04-29 17:05:51 +02:00
Ruben Bridgewater
f0a6cb0593
assert: minor error message improvements
Adjust indentations and fix a typo.

PR-URL: https://github.com/nodejs/node/pull/20315
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-04-29 17:05:51 +02:00
Hackzzila
564048dc29
http,https,tls: switch to WHATWG URL parser
This switches the url parser from `url.parse()` to the WHATWG URL
parser while keeping `url.parse()` as fallback.

Also add tests for invalid url deprecations and correct hostname
checks.

PR-URL: https://github.com/nodejs/node/pull/20270
Fixes: https://github.com/nodejs/node/issues/19468
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29 17:03:16 +02:00
Santiago Gimeno
511230fdae
child_process: fix leak when passing http sockets
After passing an HTTP socket, release its associated resources.

PR-URL: https://github.com/nodejs/node/pull/20305
Fixes: https://github.com/nodejs/node/issues/15651
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-29 16:54:18 +02:00
Ruben Bridgewater
60b5b38b48
buffer: do not always use defaults
The Buffer#(read|write)U?Int(B|L)E functions should not use a default
value. This is very likely a bug and it was never documented that
way.

Besides that this also improves the tests by adding more tests and by
refactoring them to less code lines.

PR-URL: https://github.com/nodejs/node/pull/20054
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-04-29 16:52:46 +02:00
Anatoli Papirovski
198eb9c5d6
timers: reschedule interval even if it threw
To match browser behaviour, intervals should continue being
scheduled even if the user callback threw during execution.

PR-URL: https://github.com/nodejs/node/pull/20002
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-29 16:51:05 +02:00
Vse Mozhet Byt
a3bd06a5e6 doc: remove redundant empty lines
PR-URL: https://github.com/nodejs/node/pull/20398
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29 17:48:43 +03:00
Vse Mozhet Byt
8809f8b40b doc: add missing backticks in n-api.md
Codify types, variable names, and code fragments
checking patterns I've managed to think of.

Some nits were also fixed in passing
(add missing periods, remove extra line breaks etc).

PR-URL: https://github.com/nodejs/node/pull/20390
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29 17:43:51 +03:00
Anatoli Papirovski
b55a11d1b1
http2: fix responses to long payload reqs
When a request with a long payload is received, http2 does
not allow a response that does not process all the incoming
payload. Add a conditional Http2Stream.close call that runs
only if the user hasn't attempted to read the stream.

PR-URL: https://github.com/nodejs/node/pull/20084
Fixes: https://github.com/nodejs/node/issues/20060
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-04-28 18:17:28 +02:00
Shigeki Ohtsu
c51b7b296e
tls: fix getEphemeralKeyInfo to support X25519
`EVP_PKEY_EC` only covers ANSI X9.62 curves not IETF ones(curve25519
and curve448). This fixes to add support of X25519 in
`tlsSocket.getEphemeralKeyInfo()`.
X448 should be added in the future upgrade to OpenSSL-1.1.1.

PR-URL: https://github.com/nodejs/node/pull/20273
Fixes: https://github.com/nodejs/node/issues/20262
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-04-28 17:17:53 +02:00
Daniel Bevenius
bdf0d9b364
fs: point isFd to isUint32
This commit updates the isFd function to call isUint32 instead of
doing the same thing.

PR-URL: https://github.com/nodejs/node/pull/20330
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-28 17:15:39 +02:00
Daniel Bevenius
65021c5632
stream: only check options once in Duplex ctor
This commit updates the Duplex constructor adding an if statement
checking if options is undefined, and removes the check from the
following three if statements.

PR-URL: https://github.com/nodejs/node/pull/20353
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-28 17:13:55 +02:00
Anna Henningsen
e797d5babd
benchmark: add bench for zlib gzip + gunzip cycle
Originally wrote this for some work that is going to take a while
longer before it’s ready to be PR’ed, so it seems fine to start
with this on its own.

PR-URL: https://github.com/nodejs/node/pull/20034
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-28 08:32:12 +02:00
Anna Henningsen
7016ee658a
src: remove unnecessary copy operations in tracing
PR-URL: https://github.com/nodejs/node/pull/20356
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-04-28 08:27:17 +02:00
Anatoli Papirovski
16aee380a5
util: fix isInsideNodeModules inside error
When isInsideNodeModules gets called while already processing
another stack trace, V8 will not call prepareStackTrace again.
This used to cause Node.js to just crash — fix it by checking
for expected return type of the stack (Array).

PR-URL: https://github.com/nodejs/node/pull/20266
Fixes: https://github.com/nodejs/node/issues/20258
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-28 08:20:51 +02:00
Rich Trott
99d56a4749 console: fix console.table() display edge case
If the properties are not specified in `console.table()`, then we should
make a best effort to determine them rather than put all values into a
"Values" column.

PR-URL: https://github.com/nodejs/node/pull/20323
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-27 23:07:35 -07:00
Vse Mozhet Byt
65d97c96aa doc: unify and dedupe returned values in timers.md
PR-URL: https://github.com/nodejs/node/pull/20310
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: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-04-28 05:13:34 +03:00