Commit Graph

25707 Commits

Author SHA1 Message Date
James M Snell
bcdd228f90
perf_hooks: implement histogram based api
Add a sampling-based event loop delay monitor.

```js
const { monitorEventLoopDelay } = require('perf_hooks');

const h = monitorEventLoopDelay();

h.enable();

h.disable();

console.log(h.percentiles);
console.log(h.min);
console.log(h.max);
console.log(h.mean);
console.log(h.stddev);
console.log(h.percentile(50));
```

PR-URL: https://github.com/nodejs/node/pull/25378
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-08 09:20:18 -08:00
cjihrig
679c23f2ae
report: use uv_getnameinfo() for socket endpoints
PR-URL: https://github.com/nodejs/node/pull/25962
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-08 11:32:08 -05:00
Michaël Zasso
582c12260e
deps: update acorn to 6.0.7
acorn and acorn-walk are now published as two different packages. Put
them both in subdirectories of `deps/acorn`.
Adapt the REPL's recoverable error detection to use the new API for
extending acorn parsers.

PR-URL: https://github.com/nodejs/node/pull/25844
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-02-08 15:34:10 +01:00
cjihrig
39171d755d
report: widen scope of #ifndef
This commit moves a #ifndef _WIN32 to contain the entire if
statement that inspects file descriptors. Prior to this commit,
the #ifndef was inside the if, making it essentially dead code
on Windows.

PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-08 09:11:15 -05:00
cjihrig
4b4d46539d
report: remove unnecessary case block scopes
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-08 09:11:10 -05:00
cjihrig
e49040bd11
report: remove empty string stream insertion
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-08 09:10:35 -05:00
Gireesh Punathil
c70e853723
src: nullcheck on trace controller
Insert a NULLCHECK prior to return. Ideally we do this in the caller,
but the TraceController object is somewhat special as:
1. It is accessed by most threads
2. It's life cycle is managed by Agent::Agent
3. It's getter is invoked through Base Methods (upstream)

Refs: https://github.com/nodejs/node/issues/25814

PR-URL: https://github.com/nodejs/node/pull/25943
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-08 14:57:42 +01:00
MaleDong
3a4521a4a2
lib: remove dollar symbol for private function
Just remove '$' because this isn't a programming language like Python.

PR-URL: https://github.com/nodejs/node/pull/25590
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08 14:55:01 +01:00
Tom Gallacher
f265225c19
src: allow --perf-prof-unwinding-info in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/25565
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-08 14:43:18 +01:00
Tom Gallacher
f5b9a782a9
src: allow --perf-basic-prof-only-functions in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/25565
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-08 14:43:16 +01:00
LakshmiSwethaG
0f0e7f55f8
test: refactor to block-scope
PR-URL: https://github.com/nodejs/node/pull/25532
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08 14:42:04 +01:00
Rich Trott
62942e9ad7 lib: replace 'assert' with 'internal/assert' for many built-ins
Replace large 'assert' module with tiny 'internal/assert' module for
many built-in uses.

PR-URL: https://github.com/nodejs/node/pull/25956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-02-08 00:01:12 -08:00
Rich Trott
5d609bb11c assert: create internal/assert micro-module
For use in built-in modules that could benefit from `assert()` without
having to load the entire module (unless an AssertionError actually
occurs): lib/internal/assert.js.

PR-URL: https://github.com/nodejs/node/pull/25956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-02-08 00:01:09 -08:00
Rich Trott
64745c3ade assert: refactor internal assert.js
Move lib/internal/assert.js to lib/internal/assert/assertion_error.js.
This is in preparation for making lib/internal/assert.js a tiny module
for use in Node.js built-ins so that we can use `assert()` without
having to load the entire ~1200 line `assert` module.

PR-URL: https://github.com/nodejs/node/pull/25956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-02-08 00:01:07 -08:00
Gireesh Punathil
7182aca108 src: make watchdog async callback a lambda
`Watchdog::Async` features only once for the
async callback, so make it a lambda.

PR-URL: https://github.com/nodejs/node/pull/25945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08 13:01:25 +05:30
gengjiawen
3a02d39df9 src: make deleted function public in agent.h
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25909
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-02-08 07:22:24 +01:00
Gireesh Punathil
2ea2000625 test: exit sequence sanity tests
Execute JS code in worker through same vm context
while exiting from the main thread at arbitrary
execution points, and make sure that the workers
quiesce without crashing.

`worker_threads` are not necessarily the subject of
testing, those are used for easy simulation of
multi-thread scenarios.

Refs: https://github.com/nodejs/node/issues/25007

PR-URL: https://github.com/nodejs/node/pull/25085
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-08 10:16:41 +05:30
Joyee Cheung
b44131ab92
lib: use internal/options to query --abort-on-uncaught-exception
Instead of using
`internalBinding('config').shouldAbortOnUncaughtException`.
Also removes that property from the binding.

PR-URL: https://github.com/nodejs/node/pull/25862
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08 08:09:56 +08:00
Joyee Cheung
09a5f0252e
process: move deprecation warning initialization into pre_execution.js
Since this is only necessary when user code execution is expected.

PR-URL: https://github.com/nodejs/node/pull/25825
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-08 08:08:48 +08:00
Joyee Cheung
041424f87c
lib: move signal event handling into bootstrap/node.js
Moves the `process.on()` and `promise.emit()` calls happened during
bootstrap for signal events into `bootstrap/node.js` so it's easier
to tell the side effects.

Drive-by changes:

- Moves the signal event re-arming to a point later during
  the bootstrap - as early as it were it's unlikely that there
  could be any existing signal events to re-arm for node-report.
- Use a Map instead of an Object for signal wraps since it is used
  as a deletable dictionary anyway.

PR-URL: https://github.com/nodejs/node/pull/25859
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-08 07:10:50 +08:00
ZYSzys
b4e670dc26 benchmark: remove unreachable return
PR-URL: https://github.com/nodejs/node/pull/25883
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-07 13:21:33 +01:00
gengjiawen
4e07d210e1 src: use bool instead of integer literal in connection_wrap.cc
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25923
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-07 08:14:47 +01:00
gengjiawen
abba1020f4 src: refactor to nullptr in cpp code
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25888
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-02-07 07:39:42 +01:00
Luigi Pinca
b8d9d4ac68 test: refactor test-http-agent-timeout-option
There is no need to establish a TCP connection. It is sufficient to
test that the listener that forwards the `'timeout'` event from the
socket to the `ClientRequest` instance is added to the socket.

PR-URL: https://github.com/nodejs/node/pull/25886
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-07 07:38:48 +01:00
gengjiawen
0e54a0a213 src: clean unused code in agent.h
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25914
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-07 07:30:26 +01:00
ZYSzys
93e0c6ae89 src: use NULL check macros to check nullptr
PR-URL: https://github.com/nodejs/node/pull/25916
Refs: https://github.com/nodejs/node/pull/20914
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-07 07:22:38 +01:00
Rich Trott
2a212549dc tools: apply more stringent lint rules for benchmark code
All benchmark code uses trailing commas on multi-line arrays and arrow
functions for anonymous callbacks. Apply lint rules to that effect.

PR-URL: https://github.com/nodejs/node/pull/25944
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 22:18:34 -08:00
Rich Trott
29e74d4952 benchmark: refactor for consistent style
Code in benchmark directory sometimes uses `function () {}` for
anonymous callbacks and sometimes uses `() => {}`. Multi-line arrays
sometimes have a trailing comma and sometimes do not. Update to always
use arrow functions for anonymous callbacks and trailing commas for
multiline arrays.

PR-URL: https://github.com/nodejs/node/pull/25944
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 22:18:31 -08:00
Daniel Bevenius
d310d8df62 src: fix compiler warnings in node_buffer.cc
Currently the following compiler warnings are generated on Linux:
../src/node_buffer.cc:
In function 'void node::Buffer::{anonymous}::StringSlice(
    const v8::FunctionCallbackInfo<v8::Value>&)
      [with node::encoding encoding = (node::encoding)1]':
../src/node_buffer.cc:54:20: warning:
'start' may be used uninitialized in this function
[-Wmaybe-uninitialized]
   if (end < start) end = start;
                    ^~~
../src/node_buffer.cc:50:10: note: 'start' was declared here
   size_t start;
          ^~~~~

This commit initializes start and end to zero to avoid these warnings.

PR-URL: https://github.com/nodejs/node/pull/25665
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-07 05:33:11 +01:00
Lance Ball
93a57c3f1f doc: add a sentence about REPLACEME in code changes
When adding to the REPL API recently, I was unsure what to put as a
version number for the new method I added. This change adds a reference
to `releases.md` where the use of `REPLACEME` is discussed.

PR-URL: https://github.com/nodejs/node/pull/25961
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-07 05:26:04 +01:00
Rich Trott
cf43846e25 doc: revise Collaborator Guide on reverting
Revise the "Reverting commits" section of the Collaborator Guide. Reduce
passive voice. Increase clarity.

PR-URL: https://github.com/nodejs/node/pull/25942
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-02-06 20:20:34 -08:00
Sam Roberts
a046ae5ced test: clarify confusion over "client" in comment
Fix perplexing comment. It's not that TLS "clients" don't support
'secureConnect', it's that client sockets created with `new TLSSocket`
(as opposed to `tls.connect()`) don't support that event.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:45 -08:00
Sam Roberts
d597b9193f test: use mustCall(), not global state checks
Instead of pushing state into global arrays and checking the results
before exit, use common.mustCall() and make the checks immediately.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:41 -08:00
Sam Roberts
b52a8f3507 test: use common.mustCall(), and log the events
PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:36 -08:00
Sam Roberts
a06f67f454 test: use mustCall in ephemeralkeyinfo test
PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:30 -08:00
Sam Roberts
1f4c5bdbca test: send a bad record only after connection done
Connection is known to be completely setup only after data has
exchanged, so wait unil data echo before sending a bad record.
Otherwise, the bad record could interrupt completion of the server's
handshake, and whether the error is emitted on the connection or server
is a matter of timing.

Also, assert that server errors do not occur. 'error' would crash node
with and unhandled event, but 'tlsClientError' is ignored by default.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:22 -08:00
Sam Roberts
1bd42833d7 test: end tls gracefully, rather than destroy
The timing of destroy between client/server is undefined, but end is
guaranteed to occur.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:18 -08:00
Sam Roberts
bca2e219a3 test: pin regression test for #8074 to TLS 1.2
This test has a dependency on the order in which the TCP connection is
made, and TLS server handshake completes. It assumes those server side
events occur before the client side write callback, which is not
guaranteed by the TLS API. It usually passes with TLS1.3, but TLS1.3
didn't exist at the time the bug existed.

Pin the test to TLS1.2, since the test shouldn't be changed in a way that
doesn't trigger a segfault in 7.7.3:
- https://github.com/nodejs/node/issues/13184#issuecomment-303700377

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:11 -08:00
Sam Roberts
1316b7652a test: do not race connection and rejection
Existing code assumed that the server completed the handshake before the
client rejected the certificate, and destroyed the socket. This
assumption is fragile, remove it, and instead check explicitly that data
can or cannot be exchanged via TLS, whichever is expected.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:18:05 -08:00
Sam Roberts
426a87025b test: do not assume tls handshake order
Do not assume that server handshake event happens before client, it is
not guaranteed.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:17:53 -08:00
Sam Roberts
8bc39e7286 test: do not assume server gets secure connection
Test assumed that server got the the connection before the client
destroys it, but that is not guaranteed. Also, the test was closing the
TCP connection 3 times, effectively:

1. on the server side, right after TLS connection occurs (if it does)
2. on the client side, internal to tls, when the cert is rejected
3. again on the client side, in the error event which is emitted by
   the internal tls destroy from 2

This is too often, and the dependency on 1 occurring is fragile.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:17:45 -08:00
Sam Roberts
cdd6eb237b test: wait for TCP connect, not TLS handshake
Test assumed server gets a handshake before the client destroyed it, and
didn't assert that dns.lookup() callback occurred.

PR-URL: https://github.com/nodejs/node/pull/25508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 15:17:40 -08:00
Rich Trott
5d52c8e43c test: add util.isDeepStrictEqual edge case tests
Test for deep strict equality when prototype and toStringTag
have been modified in surprising ways.

PR-URL: https://github.com/nodejs/node/pull/25932
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 13:34:49 -08:00
Rich Trott
935b1af990 test: add BigInt test for isDeepStrictEqual
Add some BigInt tests for test-util-isDeepStrictEqual to get 100%
coverage for lib/internal/util/comparisons.js.

PR-URL: https://github.com/nodejs/node/pull/25932
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 13:34:46 -08:00
sreepurnajasti
f31794bf14
doc: fix err_synthetic issue on v11.x
Fixes: https://github.com/nodejs/node/issues/25750

PR-URL: https://github.com/nodejs/node/pull/25770
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-06 21:00:37 +01:00
Joyee Cheung
475c43c1b0
perf_hooks: only enable GC tracking when it's requested
Previously a GC prologue callback and a GC epilogue callback
are always unconditionally enabled during bootstrap when
the `performance` binding is loaded, even when the user does
not use the performance timeline API to enable GC tracking.
This patch makes the callback addition conditional and only
enables them when the user explicitly requests
`observer.observe(['gc'])` to avoid the overhead.

PR-URL: https://github.com/nodejs/node/pull/25853
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 20:02:59 +01:00
Luigi Pinca
cc5de5a5cc
http: remove redundant call to socket.setTimeout()
`Socket.prototype.setTimeout()` clears the previous timer before setting
a new one.

Refs: https://github.com/nodejs/node/pull/25748#discussion_r253393234

PR-URL: https://github.com/nodejs/node/pull/25928
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 19:38:11 +01:00
Sam Roberts
00d49ad673
tls: null not valid as a renegotiate callback
Allow undefined as a callback, but do not allow null.

PR-URL: https://github.com/nodejs/node/pull/25929
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06 19:36:55 +01:00
Rich Trott
6da82b1057 worker: remove undocumented .onclose property
Remove setting of a 'close' event handler on MessagePort through the use
of an `.onclose` property. We don't use this convention anywhere else in
our codebase for 'close' events, this feature is undocumented, and we
don't test it.

PR-URL: https://github.com/nodejs/node/pull/25904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-02-06 08:55:43 -08:00
Robin Neatherway
106dd1e345 lib: fix a few minor issues flagged by lgtm
* Confusing (but correct) regex using `A-z` character range by
  accident
* Add the status argument to afterShutdown

PR-URL: https://github.com/nodejs/node/pull/25873
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-02-06 11:09:29 -05:00