Rich Trott
bf2e96460c
test: use smaller input file for test-zlib.js
...
PR-URL: https://github.com/nodejs/node/pull/17988
Fixes: https://github.com/nodejs/node/issues/17986
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-01-09 15:59:43 -08:00
sreepurnajasti
7969811a88
test: replace assert.throws with expectsError
...
PR-URL: https://github.com/nodejs/node/pull/17997
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 15:32:50 -08:00
James M Snell
a02fcd2716
http2: use aliased buffer for perf stats, add stats
...
Add an aliased buffer for session and stream statistics,
add a few more metrics
PR-URL: https://github.com/nodejs/node/pull/18020
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-01-09 12:33:13 -08:00
Anatoli Papirovski
ececdd3167
perf_hooks: fix scheduling regression
...
Scheduling a PerformanceGCCallback should not keep the
loop alive but due to the recent switch to using the
native SetImmediate method, it does. Go back to using
uv_async_t and add a regression test.
PR-URL: https://github.com/nodejs/node/pull/18051
Fixes: https://github.com/nodejs/node/issues/18047
Refs: https://github.com/nodejs/node/pull/18020
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-01-09 08:25:37 -08:00
James M Snell
33039871c9
http2: verify flood error and unsolicited frames
...
* verify protections against ping and settings flooding
* Strictly handle and verify handling of unsolicited ping and
settings frame acks.
PR-URL: https://github.com/nodejs/node/pull/17969
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-08 13:10:45 -08:00
Andreas Madsen
6aac05bf47
trace_events: stop tracing agent in process.exit()
...
PR-URL: https://github.com/nodejs/node/pull/18005
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-01-08 11:54:24 +01:00
Matteo Collina
acf56be536
fs: guarantee order of callbacks in ws.close
...
Refactor WriteStream.prototype.close and WriteStream.prototype._destroy
to always call the callback passed to close in order. Protects from
calling .close() without a callback.
Fixes: https://github.com/nodejs/node/issues/17951
See: https://github.com/nodejs/node/pull/15407
PR-URL: https://github.com/nodejs/node/pull/18002
Fixes: https://github.com/nodejs/node/issues/17951
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-08 09:17:16 +01:00
Anna Henningsen
d1ad4a9117
test: refactor test-repl
...
- Switch over to async tracking through promises/async fns
- Remove an unused temp dir refresh
- Inline the multiline/npm text prompts into expectations
- Unify handling prompts/stripping prompts out
- Make sure no unexpected data is received by requireing
all *lines* to be matched, rather than chunks received from
the REPL. This made the test too loose in terms of
matched lines and too strict in terms of stream chunking
requirements.
- Some general cleanup
PR-URL: https://github.com/nodejs/node/pull/17926
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-06 22:19:58 +01:00
Anatoli Papirovski
b396c4db66
test: fix flaky test-http-pipeline-flood
...
PR-URL: https://github.com/nodejs/node/pull/17955
Refs: https://github.com/nodejs/node/issues/16317
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-06 12:43:15 -05:00
Refael Ackermann
15016f227b
test: add more asserts to test-internal-errors
...
PR-URL: https://github.com/nodejs/node/pull/13686
Fixes: https://github.com/nodejs/node/issues/13682
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-01-06 04:04:29 +01:00
Refael Ackermann
29d99c1885
test: fix common.expectsError
...
The function should strictly test for the error class and only accept
the correct one. Any other error class should fail.
PR-URL: https://github.com/nodejs/node/pull/13686
Fixes: https://github.com/nodejs/node/issues/13682
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-01-06 04:04:29 +01:00
Ruben Bridgewater
f26cabbe24
test: fix wrong error classes passed in as type
...
PR-URL: https://github.com/nodejs/node/pull/13686
Fixes: https://github.com/nodejs/node/issues/13682
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-01-06 04:04:28 +01:00
James M Snell
22760f31be
http2: verify that a dependency cycle may exist
...
PR-URL: https://github.com/nodejs/node/pull/17968
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-01-05 13:27:42 -08:00
James M Snell
882e7ef354
http2: implement maxSessionMemory
...
The maxSessionMemory is a cap for the amount of memory an
Http2Session is permitted to consume. If exceeded, new
`Http2Stream` sessions will be rejected with an
`ENHANCE_YOUR_CALM` error and existing `Http2Stream`
instances that are still receiving headers will be
terminated with an `ENHANCE_YOUR_CALM` error.
PR-URL: https://github.com/nodejs/node/pull/17967
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-05 12:35:33 -08:00
Vse Mozhet Byt
254c80deca
doc: re-alphabetise sections in common/README.md
...
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 12:50:15 +01:00
Vse Mozhet Byt
ec6ef6bd9a
doc: fix code nits in common/README
...
1. Sync comments and code
2. Fix typos
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 12:50:14 +01:00
Vse Mozhet Byt
54e8f4835f
doc: compact eslint directives in common/README
...
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 12:50:13 +01:00
Rich Trott
9fea7eae9a
buffer: check byteLength in readUInt(B|L)E
...
PR-URL: https://github.com/nodejs/node/pull/11146
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@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: Colin Ihrig <cjihrig@gmail.com >
2018-01-05 12:40:26 +01:00
Rich Trott
94d64877ff
benchmark: improve buffer.readInt(B|L)E benchmarks
...
Split them into their own benhmark file and use different byteLength
values.
PR-URL: https://github.com/nodejs/node/pull/11146
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@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: Colin Ihrig <cjihrig@gmail.com >
2018-01-05 12:40:07 +01:00
Sebastian Van Sande
d964ffeec3
buffer: check byteLength in readInt(B|L)E
...
The 'byteLength' argument should be required and of type 'number'.
It should have a value between 1 and 6.
PR-URL: https://github.com/nodejs/node/pull/11146
Fixes: https://github.com/nodejs/node/issues/10515
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@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: Colin Ihrig <cjihrig@gmail.com >
2018-01-05 12:37:38 +01:00
Todd Wong
7914b7524d
cluster: support windowsHide option for workers
...
Fixes: https://github.com/nodejs/node/issues/17370
PR-URL: https://github.com/nodejs/node/pull/17412
Fixes: https://github.com/nodejs/node/issues/17370
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-05 02:51:49 +01:00
Tobias Nießen
fb6e980e1e
test: rename regression tests
...
PR-URL: https://github.com/nodejs/node/pull/17948
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 02:30:33 +01:00
Anatoli Papirovski
a51944da0a
test: fix flaky test-http-highwatermark
...
PR-URL: https://github.com/nodejs/node/pull/17949
Fixes: https://github.com/nodejs/node/issues/17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 02:14:12 +01:00
Anatoli Papirovski
c043b82655
test: fix flaky test-pipe-unref
...
PR-URL: https://github.com/nodejs/node/pull/17950
Fixes: https://github.com/nodejs/node/issues/16875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 01:21:52 +01:00
Anatoli Papirovski
9cef060333
test: fix flaky http-writable-true-after-close
...
PR-URL: https://github.com/nodejs/node/pull/17952
Fixes: https://github.com/nodejs/node/issues/16321
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 01:20:23 +01:00
Tobias Nießen
5160dd0365
test: fix crypto test case to use correct encoding
...
The callback would have errored out anyway due to the incorrect
encoding, and that error is not the point of this test case.
PR-URL: https://github.com/nodejs/node/pull/17956
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 01:15:08 +01:00
Weijia Wang
a2d0623fa8
test: simplify test-buffer-slice.js
...
Use forEach loop to reduce some redundant codes.
PR-URL: https://github.com/nodejs/node/pull/17962
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@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-01-05 01:13:03 +01:00
Anatoli Papirovski
d72c78b19c
test: fix flaky test-resolve-async
...
PR-URL: https://github.com/nodejs/node/pull/17957
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-05 01:08:03 +01:00
James M Snell
2f6d1001c8
doc: add docs for common/http2.js utility
...
PR-URL: https://github.com/nodejs/node/pull/17942
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-03 14:46:03 -08:00
James M Snell
651ce28be9
http2: properly handle already closed stream error
...
PR-URL: https://github.com/nodejs/node/pull/17942
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-03 14:45:57 -08:00
James M Snell
efdadcc193
http2: add aligned padding strategy
...
Add a padding strategy option that makes a best attempt to ensure
that total frame length for DATA and HEADERS frames are aligned
on multiples of 8-bytes.
PR-URL: https://github.com/nodejs/node/pull/17938
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-03 12:57:18 -08:00
James M Snell
060babd665
http2: add initial support for originSet
...
Add new properties to `Http2Session` to identify alpnProtocol,
and indicator about whether the session is TLS or not, and
initial support for origin set (preparinng for `ORIGIN` frame
support and the client-side `Pool` implementation.
The `originSet` is the set of origins for which an `Http2Session`
may be considered authoritative. Per the `ORIGIN` frame spec,
the originSet is only valid on TLS connections, so this is only
exposed when using a `TLSSocket`.
PR-URL: https://github.com/nodejs/node/pull/17935
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-01-03 11:29:43 -08:00
Benjamin Zaslavsky
30892c8fb4
test: fix require-deps-deprecation for installed deps
...
Test test-require-deps-deprecation.js was failing when user already had
node installed with acorn in require.resolve range.
Modified test to acknowledge the possibility and throw only if acorn is
found in the deps directory.
PR-URL: https://github.com/nodejs/node/pull/17848
Fixes: https://github.com/nodejs/node/issues/17148
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-03 13:59:52 -05:00
Tobias Nießen
8951fcff2b
test: update references to archived repository
...
PR-URL: https://github.com/nodejs/node/pull/17924
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-03 18:22:48 +01:00
James M Snell
ce22d6f917
http2: add altsvc support
...
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-03 08:45:58 -08:00
James M Snell
653e894883
http2: strictly limit number on concurrent streams
...
Strictly limit the number of concurrent streams based on the
current setting of the MAX_CONCURRENT_STREAMS setting
PR-URL: https://github.com/nodejs/node/pull/16766
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com >
2018-01-02 14:56:30 -08:00
James M Snell
231b1166cf
http2: perf_hooks integration
...
Collect and report basic timing information about `Http2Session`
and `Http2Stream` instances.
PR-URL: https://github.com/nodejs/node/pull/17906
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-02 08:56:30 -08:00
Anatoli Papirovski
54062d30cf
timers: refactor setImmediate error handling
...
If an error is encountered during the processing of Immediates, schedule
the remaining queue to finish after all error handling code runs (if the
process is still alive to do so). The new changes make the Immediates
error handling behaviour entirely deterministic and predictable, as the
full queue will be flushed on each Immediates cycle, regardless of
whether an error is encountered or not.
Currently this processing is scheduled for nextTick which can yield
unpredictable results as the nextTick might happen as early as close
callbacks phase or as late as after the next event loop turns Immediates
all fully processed. The latter can result in two full cycles of
Immediates processing during one even loop turn.
The current implementation also doesn't differentiate between Immediates
scheduled for the current queue run or the next one, so Immediates that
were scheduled for the next turn of the event loop, will process
alongside the ones that were scheduled for the current turn.
PR-URL: https://github.com/nodejs/node/pull/17879
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-02 11:16:33 -05:00
Tobias Nießen
d67e71e4f7
test: improve readability of some crypto tests
...
PR-URL: https://github.com/nodejs/node/pull/17904
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-01-01 18:19:12 +01:00
sreepurnajasti
166a2ceeb7
test: use countdown in test file
...
Fixes: https://github.com/nodejs/node/issues/17169
PR-URL: https://github.com/nodejs/node/pull/17874
Fixes: https://github.com/nodejs/node/issues/17169
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-12-30 18:31:56 +08:00
Daniel Bevenius
4117e22cf3
test: fix repl-tab-complete --without-ssl
...
Currently, when configured --without-ssl test-repl-tab-complete fails
with the following error:
assert.js:43
throw new errors.AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual []
at testRepl.complete.common.mustCall
(node/test/parallel/test-repl-tab-complete.js:549:14)
at /node/test/common/index.js:530:15
at completionGroupsLoaded (repl.js:1204:5)
at REPLServer.complete (repl.js:1090:11)
at REPLServer.completer (repl.js:450:14)
at REPLServer.complete (repl.js:919:18)
at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14)
at Array.forEach (<anonymous>)
at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29)
at Module._compile (module.js:660:30)
This commit attempts to fix this test but I'm not sure if this is a
proper fix as I'm not familiar with the repl code base yet.
PR-URL: https://github.com/nodejs/node/pull/17867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-29 06:09:57 +01:00
Daniel Bevenius
6fc9c331c6
test: add hasCrypto when using binding('crypto')
...
Currently, when configured --without-ssl tests that use
process.binding('crypto') fail with the following error:
=== release test-accessor-properties ===
Path: parallel/test-accessor-properties
node/test/parallel/test-accessor-properties.js:16
const crypto = process.binding('crypto');
^
Error: No such module: crypto
at Object.<anonymous> (test-accessor-properties.js:16:24)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:577:32)
at tryModuleLoad (module.js:517:12)
at Function.Module._load (module.js:509:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:645:3
This commit adds a hasCrypto check.
PR-URL: https://github.com/nodejs/node/pull/17867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-29 06:09:57 +01:00
Weijia Wang
c64ca56def
util: improve error message of _errnoException
...
The usage of ERR_INVALID_ARG_TYPE in _errnoException
is a little inappropriate. This change is to improve it.
PR-URL: https://github.com/nodejs/node/pull/17626
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-29 12:33:34 +08:00
Ruben Bridgewater
8578fe22a9
assert: fix strict regression
...
Using `assert()` or `assert.ok()` resulted in a error since a
refactoring.
Refs: https://github.com/nodejs/node/pull/17582
PR-URL: https://github.com/nodejs/node/pull/17903
Refs: https://github.com/nodejs/node/pull/17582
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-29 00:04:40 +01:00
sreepurnajasti
968e20c7e5
test: improve to use template string
...
PR-URL: https://github.com/nodejs/node/pull/17895
Reviewed-By: Gibson Fahnestock <gibfahn@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: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-29 00:02:09 +01:00
Kelvin Jin
120ea9b5c4
http2: implement ref() and unref() on client sessions
...
PR-URL: https://github.com/nodejs/node/pull/17620
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-12-28 09:32:54 -08:00
Rich Trott
fe8a5aa0b2
test: replace map() with forEach() where appropriate
...
Two tests were using Array.prototype.map() without returning values in
the callback. In other words, they were using it where a `.forEach()`
was called for. Change to `.forEach()`.
PR-URL: https://github.com/nodejs/node/pull/17858
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-28 09:05:37 -08:00
Anatoli Papirovski
41f8c8d121
process: do not directly schedule _tickCallback in _fatalException
...
When a process encounters a _fatalException that is caught, it should
schedule execution of nextTicks but not in an arbitrary place of the
next Immediates queue. Instead, add a no-op function to the queue
that will ensure processImmediate runs, which will then ensure
that nextTicks are processed at the end.
PR-URL: https://github.com/nodejs/node/pull/17841
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-28 11:38:13 -05:00
Rich Trott
9c00f071f0
test: fix flaky test-benchmark-fs
...
Some benchmarks may return 0 operations with the new very short duration
provided by the test program. Set environment variable to allow that.
PR-URL: https://github.com/nodejs/node/pull/17885
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
2017-12-28 05:54:57 -08:00
Anna Henningsen
06666305da
http2: keep session objects alive during Http2Scope
...
Keep a local handle as a reference to the JS `Http2Session`
object so that it will not be garbage collected
when inside an `Http2Scope`, because the presence of the
latter usually indicates that further actions on
the session object are expected.
Strictly speaking, storing the `session_handle_` as a
property on the scope object is not necessary, but
this is not very costly and makes the code more
obviously correct.
Fixes: https://github.com/nodejs/node/issues/17840
PR-URL: https://github.com/nodejs/node/pull/17863
Fixes: https://github.com/nodejs/node/issues/17840
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-12-27 16:04:22 -08:00