0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

20505 Commits

Author SHA1 Message Date
James M Snell
cfca536d8f deps: update nghttp2 to 1.29.0
PR-URL: https://github.com/nodejs/node/pull/17908
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-30 10:02:40 -08:00
sreepurnajasti
27470e4ec7
doc: correct spelling
PR-URL: https://github.com/nodejs/node/pull/17911
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.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: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2017-12-30 17:59:05 +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
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
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
Daniel Bevenius
acbe00792d tools: add check for using process.binding crypto
Currently, when configuring --without-ssl any tests that use
process.binding('crypto') will not report a lint warning. This is
because the eslint check only generates a warning when using require.

This commit adds a check for using binding in addition to require.

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:08:16 +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
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
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
Tyson Andre
214bbb5228 doc: doc imitating the old behavior of http.Server.keepAliveTimeout
Documenting the best way to imitate the old behavior saves time for people
migrating from older versions. (E.g. for unexpected ECONNRESET)

It isn't immediately obvious if earlier nodejs versions behaved the same
way as nodejs 8 does with keepAliveTimeout = 0.
From 0aa7ef5950, it seems like they behave
the same way.

Related to issues such as #13391 that show up when migrating to node 8

PR-URL: https://github.com/nodejs/node/pull/17660
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-28 10:10: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
a3535f3f6f tools: enable array-callback-return ESLint rule
For array methods that depend on a callback (such as `.filter()` or
`.map()`), require a return value from the 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:44 -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
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
James M Snell
286a5d0e74 doc: fs doc improvements
PR-URL: https://github.com/nodejs/node/pull/17831
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-28 08:50:29 -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
Tobias Nießen
fd724c5c63
doc: fix typo
PR-URL: https://github.com/nodejs/node/pull/17900
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-28 16:42:46 +01: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
Timothy Gu
64129898fe
doc: use my legal name in README
Just so that it's documented. Feel free to call me anything you want
though: Timothy, Tim, 顾天骋.

PR-URL: https://github.com/nodejs/node/pull/17894
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-12-28 19:58:13 +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
Anna Henningsen
57594d2782 http2: fix compiling with --debug-http2
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:17 -08:00
Rich Trott
62a44a32ad doc: improve module.builtinModules text
`module is maintained by a third-party module` seems confusing. Changed
to `module is maintained by a third-party`.

PR-URL: https://github.com/nodejs/node/pull/17865
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-27 15:59:48 -08: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
Joyee Cheung
c56972779b
src: expose uv.errmap to binding
Add a errno -> [error code, uv error message] map to the uv binding
so the error message can be assembled in the JS layer.

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
24c71fb47c
test: make test-tls-invoke-queued use public API
`parallel/test-tls-invoke-queued` previously used the internal
`_write()` API to hook into the internals more directly, but this
invalidates the general assumption made by streams APIs that
only a single write is active at a time, and which is enforced
through the public API.

PR-URL: https://github.com/nodejs/node/pull/17864
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-27 20:03:25 +01: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
Daniel Bevenius
cb3de880be
crypto: add ocsp_request ClientHelloParser::Reset
I noticed that ocsp_request is not being reset in
ClientHelloParser::Reset. I've not been able to figure out the
the reason for this and wanted to bring this up just in case this
was overlooked and should be reset.

PR-URL: https://github.com/nodejs/node/pull/17753
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-27 19:46:48 +01:00
Anna Henningsen
b34367150e
test: refactor test-tls-securepair-fiftharg
Assert the server name directly in the `SNICallback`,
since `common.mustCall()` already guarantees that the callback
is called exactly once, making `process.on('exit')` unnecessary.

PR-URL: https://github.com/nodejs/node/pull/17836
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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>
2017-12-27 19:45:59 +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
James M Snell
9e5ccf0313
perf_hooks: refactor internals
Refactor and simplify the perf_hooks native internals.

PR-URL: https://github.com/nodejs/node/pull/17822
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-27 19:44:40 +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
Dmitriy Kasyanov
b0dd43cd63
tools: fix AttributeError: __exit__ on Python 2.6
Error occurs while dealing with Tar archives

PR-URL: https://github.com/nodejs/node/pull/17663
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-27 19:41:34 +01:00
Eugene Ostroukhov
c0e9cded1e
inspector: make Coverity happy
PR-URL: https://github.com/nodejs/node/pull/17656
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-27 19:41:08 +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
Rich Trott
03b8ac14e7 test: reduce scope of variable in common module
arrayBufferViews is used by only one function so scope it to that
function (in the common module).

PR-URL: https://github.com/nodejs/node/pull/17830
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-26 09:55:17 -08: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
Ruben Bridgewater
9ca4ab1317
doc: use dashes instead of asterisks
PR-URL: https://github.com/nodejs/node/pull/17722
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-12-26 10:41:17 +01:00
Ruben Bridgewater
6924dac6ce
doc: use consistent new lines
PR-URL: https://github.com/nodejs/node/pull/17722
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-12-26 10:41:17 +01:00
Ruben Bridgewater
5c2901391a
doc: update formatting to fit our 80 chars rule
This will also use a proper indentation as a couple of entries
had a extra indentation of two spaces.

PR-URL: https://github.com/nodejs/node/pull/17722
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-12-26 10:41:12 +01:00
Ruben Bridgewater
183f072420
doc: update AUTHORS list
PR-URL: https://github.com/nodejs/node/pull/17805
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-12-26 10:23:29 +01:00
Shobhit Chittora
639770c8d6 tools: autofixer for lowercase-name-for-primitive
PR-URL: https://github.com/nodejs/node/pull/17715
Refs: https://github.com/nodejs/node/issues/16636
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2017-12-26 13:51:53 +08:00
Rich Trott
8331f571ed test: remove undefined function
`common.fail()` no longer exists as its functionality is now in
`assert.fail()`. Replace only two instances in the code base with
`assert.fail()`.

PR-URL: https://github.com/nodejs/node/pull/17845
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-12-26 10:26:07 +08:00