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
f3f3f8890c
lib: enable dot-notation eslint rule
...
PR-URL: https://github.com/nodejs/node/pull/18007
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-01-09 10:52:18 -05:00
Anatoli Papirovski
fbad8bb1fa
async_hooks: update defaultTriggerAsyncIdScope for perf
...
The existing version of defaultTriggerAsyncIdScope creates an Array
for the callback's arguments which is highly inefficient. Instead,
use rest syntax and allow V8 to do that work for us. This yields
roughly 2x performance for this particular function.
PR-URL: https://github.com/nodejs/node/pull/18004
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-01-09 10:43:00 -05: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
b171adc4d1
lib: remove queue implementation from JSStreamWrap
...
The streams implementation generally ensures that only one write()
call is active at a time. `JSStreamWrap` instances still kept
queue of write reqeuests in spite of that; refactor it away.
Also, fold `isAlive()` into a constant function on the native side.
PR-URL: https://github.com/nodejs/node/pull/17918
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-07 21:21:32 +01: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
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
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
Evan Lucas
189d29f39e
http: remove duplicate export
...
5425e0dcbe switched to using
the module.exports pattern vs just exports, but left
a duplicate export around for OutgoingMessage.
PR-URL: https://github.com/nodejs/node/pull/17982
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2018-01-04 18:22:59 -06:00
Ruben Bridgewater
11dda69a33
repl: refactor code for readability
...
PR-URL: https://github.com/nodejs/node/pull/17919
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-01-04 21:21:22 +01:00
Ruben Bridgewater
80988f9322
repl: upper case comments first char
...
PR-URL: https://github.com/nodejs/node/pull/17919
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-01-04 21:21:21 +01: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
James M Snell
b25b1efa0a
tls: set servername on client side too
...
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:39 -08:00
Tobias Nießen
3b1e263b7b
readline: 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:52 +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
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
47ee340a9e
http2: remove duplicate words in comments
...
PR-URL: https://github.com/nodejs/node/pull/17939
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-02 00:32:58 +01:00
Anatoli Papirovski
5846786424
src: use AliasedBuffer for TickInfo
...
PR-URL: https://github.com/nodejs/node/pull/17881
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-12-30 19:05:58 -05:00
Anatoli Papirovski
2c94424a0d
timers: remove domain enter and exit
...
With domains implemented over AsyncHooks, it's no longer
necessary to explicitly enter and exit the domain.
PR-URL: https://github.com/nodejs/node/pull/17880
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-12-30 18:58:43 -05:00
Tobias Nießen
a82b1b7b30
errors: remove ERR_OUTOFMEMORY
...
PR-URL: https://github.com/nodejs/node/pull/17877
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-12-29 21:16:14 +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
Jeremiah Senkpiel
f94eec0218
http: convert utcDate to use setTimeout
...
A sort-of follow-up to https://github.com/nodejs/node/pull/17704 , this
removes the last internal use of enroll().
PR-URL: https://github.com/nodejs/node/pull/17800
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-12-29 00:08:54 +01: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
Ben Noordhuis
507aab58ca
repl: fix coloring of process.versions
...
Remove the custom formatter that was added in commit 4fb27d4 ("intl: Add
more versions from ICU"). It's not necessary anymore (and may not have
been necessary at all) and prevents proper coloring in the REPL.
PR-URL: https://github.com/nodejs/node/pull/17861
Fixes: https://github.com/nodejs/node/issues/17086
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-28 10:16:26 -08: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
5c7af90cbf
readline: refactor filter() callback
...
Use construct that always returns a boolean for `filter()` callback.
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:30 -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
Anton Paras
d3ac18a176
lib: migrate _http_outgoing.js's remaining errors
...
A couple of lib/_http_outgoing.js's errors were still in the
"old style": `throw new Error(<some message here>)`.
This commit migrates those 2 old style errors to the "new style":
internal/errors.js's error-system.
In the future, changes to these errors' messages won't break
semver-major status. With the old style, changes to these errors'
messages broke semver-major status. It was inconvenient.
Refs: https://github.com/nodejs/node/issues/17709
PR-URL: https://github.com/nodejs/node/pull/17837
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-28 03:17:37 +08:00
Joyee Cheung
9f122e3b55
fs: throw fs.close errors in JS
...
* Collect the error context in both JS and C++, then throw
the error in JS
* Test that the errors thrown from fs.close and fs.closeSync
includes the correct error code, error number and syscall
properties
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-28 03:08:25 +08:00
Joyee Cheung
6ca10de946
fs: simplify the error context collection in C++
...
- Simplify the SyncCall template function, only collect error
number and syscall in the C++ layer and collect the rest of context
in JS for flexibility.
- Remove the stringFromPath JS helper now that the unprefixed path is
directly put into the context before the binding is invoked with the
prefixed path.
- Validate more properties in fs.access tests.
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-12-28 03:08:25 +08:00
Anna Henningsen
83e5215a4e
async_hooks: use typed array stack as fast path
...
- Communicate the current async stack length through a
typed array field rather than a native binding method
- Add a new fixed-size `async_ids_fast_stack` typed array
that contains the async ID stack up to a fixed limit.
This increases performance noticeably, since most of the time
the async ID stack will not be more than a handful of
levels deep.
- Make the JS `pushAsyncIds()` and `popAsyncIds()` functions
do the same thing as the native ones if the fast path
is applicable.
Benchmarks:
$ ./node benchmark/compare.js --new ./node --old ./node-master --runs 10 --filter next-tick process | Rscript benchmark/compare.R
[00:03:25|% 100| 6/6 files | 20/20 runs | 1/1 configs]: Done
improvement confidence p.value
process/next-tick-breadth-args.js millions=4 19.72 % *** 3.013913e-06
process/next-tick-breadth.js millions=4 27.33 % *** 5.847983e-11
process/next-tick-depth-args.js millions=12 40.08 % *** 1.237127e-13
process/next-tick-depth.js millions=12 77.27 % *** 1.413290e-11
process/next-tick-exec-args.js millions=5 13.58 % *** 1.245180e-07
process/next-tick-exec.js millions=5 16.80 % *** 2.961386e-07
PR-URL: https://github.com/nodejs/node/pull/17780
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-27 19:48:07 +01:00
Ben Noordhuis
df30fd586d
buffer: optimize readDouble and readFloat methods
...
Compute the floating point number in JavaScript to avoid having to call
out to the C++ runtime. The improvements are not insubstantial:
improvement confidence p.value
value="big" endian="BE" type="Double" noAssert="false" 292.86 % *** 1.688367e-08
value="big" endian="BE" type="Double" noAssert="true" 353.19 % *** 6.079414e-10
value="big" endian="BE" type="Float" noAssert="false" 406.21 % *** 1.730122e-07
value="big" endian="BE" type="Float" noAssert="true" 450.81 % *** 6.909242e-07
value="big" endian="LE" type="Double" noAssert="false" 268.39 % *** 8.625486e-09
value="big" endian="LE" type="Double" noAssert="true" 310.66 % *** 2.798332e-15
value="big" endian="LE" type="Float" noAssert="false" 382.99 % *** 3.412057e-07
value="big" endian="LE" type="Float" noAssert="true" 394.60 % *** 1.406742e-07
value="inf" endian="BE" type="Double" noAssert="false" 312.91 % *** 7.407943e-12
value="inf" endian="BE" type="Double" noAssert="true" 392.47 % *** 3.821179e-08
value="inf" endian="BE" type="Float" noAssert="false" 466.01 % *** 8.953363e-08
value="inf" endian="BE" type="Float" noAssert="true" 460.76 % *** 5.381256e-09
value="inf" endian="LE" type="Double" noAssert="false" 279.50 % *** 2.390682e-09
value="inf" endian="LE" type="Double" noAssert="true" 335.30 % *** 3.587173e-09
value="inf" endian="LE" type="Float" noAssert="false" 439.77 % *** 1.057133e-07
value="inf" endian="LE" type="Float" noAssert="true" 426.72 % *** 4.353408e-09
value="nan" endian="BE" type="Double" noAssert="false" 271.18 % *** 2.281526e-05
value="nan" endian="BE" type="Double" noAssert="true" 312.63 % *** 1.974975e-07
value="nan" endian="BE" type="Float" noAssert="false" 429.17 % *** 2.416228e-07
value="nan" endian="BE" type="Float" noAssert="true" 461.39 % *** 1.956714e-08
value="nan" endian="LE" type="Double" noAssert="false" 267.03 % *** 9.938479e-12
value="nan" endian="LE" type="Double" noAssert="true" 276.93 % *** 7.842481e-08
value="nan" endian="LE" type="Float" noAssert="false" 415.97 % *** 8.082710e-07
value="nan" endian="LE" type="Float" noAssert="true" 433.68 % *** 1.030200e-07
value="small" endian="BE" type="Double" noAssert="false" 273.20 % *** 9.071652e-11
value="small" endian="BE" type="Double" noAssert="true" 326.25 % *** 3.120167e-08
value="small" endian="BE" type="Float" noAssert="false" 845.61 % *** 8.044170e-08
value="small" endian="BE" type="Float" noAssert="true" 868.61 % *** 2.944539e-08
value="small" endian="LE" type="Double" noAssert="false" 251.29 % *** 5.613930e-09
value="small" endian="LE" type="Double" noAssert="true" 286.82 % *** 8.149603e-10
value="small" endian="LE" type="Float" noAssert="false" 824.87 % *** 1.199729e-08
value="small" endian="LE" type="Float" noAssert="true" 834.35 % *** 4.799620e-08
value="zero" endian="BE" type="Double" noAssert="false" 216.70 % *** 3.872293e-12
value="zero" endian="BE" type="Double" noAssert="true" 239.31 % *** 6.439601e-09
value="zero" endian="BE" type="Float" noAssert="false" 353.75 % *** 3.639974e-07
value="zero" endian="BE" type="Float" noAssert="true" 388.86 % *** 7.074318e-10
value="zero" endian="LE" type="Double" noAssert="false" 179.34 % *** 5.230763e-06
value="zero" endian="LE" type="Double" noAssert="true" 199.66 % *** 2.177589e-11
value="zero" endian="LE" type="Float" noAssert="false" 299.55 % *** 9.961978e-08
value="zero" endian="LE" type="Float" noAssert="true" 333.30 % *** 2.470764e-08
PR-URL: https://github.com/nodejs/node/pull/17775
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-12-27 19:47:16 +01:00
Anna Henningsen
46510f54be
tls: fix SNICallback without .server option
...
`options.server` only needs to be set when its
contents are actually being inspected.
PR-URL: https://github.com/nodejs/node/pull/17835
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-27 19:45:15 +01:00
XadillaX
6c0da34905
http: add rawPacket in err of clientError event
...
The `rawPacket` is the current buffer that just parsed. Adding this
buffer to the error object of `clientError` event is to make it possible
that developers can log the broken packet.
PR-URL: https://github.com/nodejs/node/pull/17672
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-27 19:42:57 +01:00
Joyee Cheung
71396a200d
fs: validate path in fs.exists{Sync}
...
PR-URL: https://github.com/nodejs/node/pull/17852
Refs: https://github.com/nodejs/node/pull/17667
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-12-27 12:47:45 -05:00
Joyee Cheung
9ec700b073
fs: validate path in fs.readFile
...
PR-URL: https://github.com/nodejs/node/pull/17852
Refs: https://github.com/nodejs/node/pull/17667
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-12-27 12:47:35 -05:00
Ben Noordhuis
ad02e0d241
timers: make setImmediate() immune to tampering
...
Make setImmediate() immune to `process` global tampering by removing
the dependency on the `process._immediateCallback` property.
PR-URL: https://github.com/nodejs/node/pull/17736
Fixes: https://github.com/nodejs/node/issues/17681
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-26 12:37:19 -05:00
Ruben Bridgewater
15d880bcb6
console: make .assert standard compliant
...
The standard does not throw and has no stack trace.
See https://console.spec.whatwg.org/#assert
PR-URL: https://github.com/nodejs/node/pull/17706
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-12-26 10:46:27 +01:00
Michaël Zasso
359819e760
module: print better message on esm import error
...
Use the same approach as a previous PR to include the offending line in
the output and underline imports of inexistent exports.
PR-URL: https://github.com/nodejs/node/pull/17786
Fixes: https://github.com/nodejs/node/issues/17785
Refs: https://github.com/nodejs/node/pull/17281
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-24 17:38:36 +01:00
Anatoli Papirovski
4444b6b9ad
process: refactor nextTick for clarity
...
Do not share unnecessary information about nextTick state
between JS & C++, instead only track whether a nextTick
is scheduled or not.
Turn nextTickQueue into an Object instead of a class
since multiple instances are never created.
Other assorted refinements and refactoring.
PR-URL: https://github.com/nodejs/node/pull/17738
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-12-24 09:12:01 -05:00
Weijia Wang
d022cb1bdd
lib: combine similar error codes
...
There two similar error codes in lib: "ERR_VALUE_OUT_OF_RANGE"
and "ERR_OUT_OF_RANGE". This change is to reduce them into
"ERR_VALUE_OUT_OF_RANGE"
Fixes: https://github.com/nodejs/node/issues/17603
PR-URL: https://github.com/nodejs/node/pull/17648
Fixes: https://github.com/nodejs/node/issues/17603
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-12-24 14:09:29 +08:00
Jon Moss
1dd9c826e0
lib, src: use process.config instead of regex
...
Is safer to use a `process.binding(config)` defined boolean, than to
regex on `process.execArgv`. Also, this better falls in line with the
conventions of checking flags passed to the executable.
PR-URL: https://github.com/nodejs/node/pull/17814
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-12-23 22:20:30 -05:00
kysnm
b98aaa312e
net: migrate errors to internal/errors
...
Throw ERR_SOCKET_CLOSED and ERR_SERVER_NOT_RUNNING
instead of the old-style errors in net.js.
PR-URL: https://github.com/nodejs/node/pull/17766
Refs: https://github.com/nodejs/node/issues/17709
Reviewed-By: Michaël Zasso <targos@protonmail.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-24 02:16:44 +08:00
Steven
8599465d33
fs: migrate errors to internal/errors
...
Throw ERR_INVALID_ARG_TYPE when validating arguments passed to
WriteStream.prototype._write.
Refs: https://github.com/nodejs/node/issues/17709
PR-URL: https://github.com/nodejs/node/pull/17719
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-24 01:42:59 +08:00
Mir Mufaqam Ali
79261f3003
tls: migrate errors in _tls_wrap.js
...
This migrates the old style error in _tls_wrap.js to
the new style error ERR_TLS_RENEGOTIATION_DISABLED.
Refs: https://github.com/nodejs/node/issues/17709
PR-URL: https://github.com/nodejs/node/pull/17792
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-12-24 00:03:39 +08:00
Timothy Gu
2cb2145162
vm: allow modifying context name in inspector
...
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627 , subprocesses and VM
contexts will be mixed up, causing confusion.
PR-URL: https://github.com/nodejs/node/pull/17720
Refs: https://github.com/nodejs/node/pull/14231#issuecomment-315924067
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-12-23 14:05:18 +08:00
James M Snell
bbaea1236f
http2: convert Http2Settings to an AsyncWrap
...
PR-URL: https://github.com/nodejs/node/pull/17763
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-12-22 12:54:13 -08:00
James M Snell
6100e12667
fs: move type checking to js
...
PR-URL: https://github.com/nodejs/node/pull/17667
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-12-22 12:49:10 -08:00