Brian White
460ee75f7e
process: improve nextTick() performance
...
PR-URL: https://github.com/nodejs/node/pull/13446
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2017-06-17 10:38:24 -04:00
Anna Henningsen
1e2905f46a
buffer: add constants object
...
Add `buffer.constants`, containing length limits for `Buffer` and
`string` instances.
This could be useful for programmers to tell whether a value can
be turned into a string or not.
Ref: https://github.com/nodejs/node/issues/13465
PR-URL: https://github.com/nodejs/node/pull/13467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-06-16 19:48:51 +02:00
Michaël Zasso
00aac57df9
util: ignore invalid format specifiers
...
In util.format, if a percent sign without a known type is encountered,
just print it instead of silently ignoring it and the next character.
PR-URL: https://github.com/nodejs/node/pull/13674
Fixes: https://github.com/nodejs/node/issues/13665
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-06-16 08:57:16 -07:00
cornholio
2777a7e04f
inspector,cluster: fix inspect port assignment
...
* Adding --inspect-port with debug port, instead of parsing `execArgv`
* Export CLI debug options to `process.binding('config').debugOptions`
(currently used only in tests)
PR-URL: https://github.com/nodejs/node/pull/13619
Refs: https://github.com/nodejs/node/pull/9659
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-15 22:50:56 -04:00
Sebastian Van Sande
de4a749788
internal/util: use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/11301
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <fhinkel@vt.edu >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-06-15 17:07:45 +02:00
sreepurnajasti
d50a802feb
errors,stream-transform: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/13310
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-15 03:03:45 -04:00
Dan Homola
aff8d358fa
errors, repl: migrate to use internal/errors.js
...
* Use existing errors where suitable
* Assign code to a REPL specific error
* Include documentation for the new error code
PR-URL: https://github.com/nodejs/node/pull/11347
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-14 23:05:25 +02:00
Sam Roberts
37fdfce93e
net: return this from getConnections()
...
PR-URL: https://github.com/nodejs/node/pull/13553
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-14 13:29:29 -07:00
Sam Roberts
cf24177aba
net: return this from destroy()
...
PR-URL: https://github.com/nodejs/node/pull/13530
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-14 13:15:51 -07:00
José F. Romaniello
3ee37329da
tls: add host and port info to ECONNRESET errors
...
Add more information to the "ECONNRESET" errors generated when the
socket hang ups before establishing the secure connection.
These kind of errors are really hard to troubleshoot without this info.
PR-URL: https://github.com/nodejs/node/pull/7476
Reviewed-By: Trevor Norris <trevnorris@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Yazhong Liu <yorkiefixer@gmail.com >
2017-06-14 21:18:24 +02:00
XadillaX
c1c226719f
https: make opts optional & immutable when create
...
`opts` in `createServer` will be immutable that won't change origional
opts value. What's more, it's optional which can make `requestListener`
be the first argument.
PR-URL: https://github.com/nodejs/node/pull/13599
Fixes: https://github.com/nodejs/node/issues/13584
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-14 15:14:34 -04:00
Andreas Madsen
de762b71f2
async_hooks: rename currentId and triggerId
...
currentId is renamed to executionAsyncId
triggerId is renamed to triggerAsyncId
AsyncResource.triggerId is renamed to AsyncResource.triggerAsyncId
AsyncHooksGetCurrentId is renamed to AsyncHooksGetExecutionAsyncId
AsyncHooksGetTriggerId is renamed to AsyncHooksGetTriggerAsyncId
PR-URL: https://github.com/nodejs/node/pull/13490
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-06-14 12:39:53 +02:00
Brian White
448c4c62d2
child_process: do not extend result for *Sync()
...
PR-URL: https://github.com/nodejs/node/pull/13601
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-13 19:19:16 -04:00
Artur G Vieira
80c9ef0b6b
http: edit _storeHeader to check for Trailer header
...
Test non-chunked message does not have trailer header set,
message will be terminated by the first empty line after the
header fields, regardless of the header fields present in the
message, and thus cannot contain a message body or 'trailers'.
PR-URL: https://github.com/nodejs/node/pull/12990
Ref: https://github.com/nodejs/node/issues/2842
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-13 13:06:39 -07:00
James M Snell
873e2f270f
errors: add missing ERR_ prefix on util.callbackify error
...
The `FALSY_VALUE_REJECTION` error code added by
https://github.com/nodejs/node/pull/12712 did not have the `ERR_` prefix,
nor was it added to the errors.md documentation. Add the prefix in for
consistency.
PR-URL: https://github.com/nodejs/node/pull/13604
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-06-13 12:33:52 -07:00
Justin Beckwith
c88ba036b4
url: ensure search property is consistently null vs empty
...
PR-URL: https://github.com/nodejs/node/pull/13606
Fixes: https://github.com/nodejs/node/issues/13404
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-06-13 12:25:19 -07:00
Brian White
add4b0ab8c
zlib: improve performance
...
PR-URL: https://github.com/nodejs/node/pull/13322
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-13 11:48:59 -07:00
Brian White
e5dc934ef6
stream: improve Transform performance
...
PR-URL: https://github.com/nodejs/node/pull/13322
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-13 11:48:53 -07:00
Daniel Bevenius
e5a494857a
lib: correct typo in createSecureContext
...
Minor correction in the comment regarding ssl_set_pkey.
PR-URL: https://github.com/nodejs/node/pull/13653
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-13 09:05:43 -07:00
Scott McKenzie
7f3f72c19b
errors, readline: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/11390
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-06-13 08:44:22 -07:00
Alexey Orlenko
d71718db6a
http: fix timeout reset after keep-alive timeout
...
Fix the logic of resetting the socket timeout of keep-alive HTTP
connections and add two tests:
* `test-http-server-keep-alive-timeout-slow-server` is a regression test
for GH-13391. It ensures that the server-side keep-alive timeout will
not fire during processing of a request.
* `test-http-server-keep-alive-timeout-slow-client-headers` ensures that
the regular socket timeout is restored as soon as a client starts
sending a new request, not as soon as the whole message is received,
so that the keep-alive timeout will not fire while, e.g., the client
is sending large cookies.
Refs: https://github.com/nodejs/node/pull/2534
Fixes: https://github.com/nodejs/node/issues/13391
PR-URL: https://github.com/nodejs/node/pull/13549
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-13 07:42:11 +03:00
Brian White
c4fc7d90ed
http: always cork outgoing writes
...
PR-URL: https://github.com/nodejs/node/pull/13522
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2017-06-12 20:42:46 -04:00
Fedor Indutny
27cc30aea8
profiler: declare missing printErr
...
`v8/tools/tickprocessor.js` assumes presence of global `printErr`, which
is defined in `d8`.
PR-URL: https://github.com/nodejs/node/pull/13590
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-06-12 14:10:35 +02:00
Luigi Pinca
ba449f3bf1
http: handle cases where socket.server is null
...
Fixes a regression that caused an error to be thrown when trying to
emit the 'timeout' event on the server referenced by `socket.server`.
Fixes: https://github.com/nodejs/node/issues/13435
Refs: https://github.com/nodejs/node/pull/11926
PR-URL: https://github.com/nodejs/node/pull/13578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-12 14:10:13 +02:00
Rajaram Gaunker
12fd63d6bb
v8: add a js class for Serializer/Dserializer
...
Calling Serializer/Deserializer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added regression tests.
Fixes: https://github.com/nodejs/node/issues/13326
PR-URL: https://github.com/nodejs/node/pull/13541
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-12 14:08:49 +02:00
Refael Ackermann
af3aa682ac
util: add callbackify
...
Add `util.callbackify(function)` for creating callback style functions
from functions returning a `Thenable`
PR-URL: https://github.com/nodejs/node/pull/12712
Fixes: https://github.com/nodejs/CTC/issues/109
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-10 22:49:28 -04:00
Nikolai Vavilov
208db5675e
fs: don't conflate data and callback in appendFile
...
PR-URL: https://github.com/nodejs/node/pull/11607
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-10 20:34:50 +03:00
Anna Henningsen
c6f074f737
Revert "readline: clean up event listener in onNewListener"
...
This reverts commit 81ddeb98f6 .
Ref: https://github.com/nodejs/node/pull/13266
PR-URL: https://github.com/nodejs/node/pull/13560
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-10 17:41:25 +02:00
Vse Mozhet Byt
390fa0380e
cluster, dns, repl, tls, util: fix RegExp nits
...
* Take RegExp creation out of cycles.
* Use test(), not match() in boolean context.
* Remove redundant RegExp parts.
PR-URL: https://github.com/nodejs/node/pull/13536
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-10 13:37:04 +03:00
Trevor Norris
a2fdb76677
async_wrap: use kTotals to enable PromiseHook
...
Keep a total of enabled hook callbacks in kTotals. This value is used to
track whether node::PromiseHook (src/async-wrap.cc) should be enabled or
disabled.
Don't enable node::PromiseHook, using enablePromiseHook(), until a hook
has been added. Then, using disablePromiseHook(), disable
node::PromiseHook when all hooks have been disabled.
Need to use a native test in order to check the internal field of the
Promise and check for a PromiseWrap.
PR-URL: https://github.com/nodejs/node/pull/13509
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-10 11:38:05 +02:00
Trevor Norris
b9379095e1
Revert "async_hooks: only set up hooks if used"
...
This reverts commit 410b141764 .
PR-URL: https://github.com/nodejs/node/pull/13509
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-10 11:37:41 +02:00
Gil Tayar
8d7f07f379
child_process: promisify includes stdio in error
...
This converts the initial implementation of a promised exec that used
the customPromisifyArgs support in util.promisify with a custom
implementation. This is because exec and execFile, when there is an
error, still supply the stdout and stderr of the process, and yet
the promisified version with customPromisifyArgs does
not supply this ability.
I created a custom implementation and attached it to exec and execFile
using the util.promisify.custom key.
Fixes: https://github.com/nodejs/node/issues/13364
PR-URL: https://github.com/nodejs/node/pull/13388
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-09 21:46:09 +02:00
Benedikt Meurer
55f9c85a05
stream: ensure that instanceof fast-path is hit.
...
With the new Ignition+TurboFan pipeline, the instanceof fast-path can be
missed if the right-hand side needs a TDZ check, i.e. is const declared
on a surrounding scope. This doesn't apply to Node 8 at this point,
where it's at V8 5.8, but it applies as soon as V8 5.9 rolls. There's
work going on in Ignition (and TurboFan) to optimize those TDZ checks
properly, but those changes will land in V8 6.1, so might not end up in
Node 8.
One way to work-around this in Node core for now is to use var instead
of const for those right-hand sides for instanceof for now, especially
Buffer in case of streams. This is not beautiful, but proper ducktape.
Improves readable-bigread.js by ~23% with Node LKGR.
PR-URL: https://github.com/nodejs/node/pull/13403
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
2017-06-09 21:44:11 +02:00
XadillaX
27de36926b
dns: add resolveAny support
...
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior
like `$ dig <domain> any` and returns an array with several types of
records.
`dns.resolveAny` parses the result packet by several rules in turn.
Supported types:
* A
* AAAA
* CNAME
* MX
* NAPTR
* NS
* PTR
* SOA
* SRV
* TXT
Fixes: https://github.com/nodejs/node/issues/2848
PR-URL: https://github.com/nodejs/node/pull/13137
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2017-06-09 19:09:28 +02:00
Brian White
8208fdae2b
child_process: reduce nextTick() usage
...
PR-URL: https://github.com/nodejs/node/pull/13459
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-06-09 01:38:58 -04:00
Brian White
dd83d11869
child_process: simplify send() result handling
...
PR-URL: https://github.com/nodejs/node/pull/13459
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-06-09 01:38:21 -04:00
Anna Henningsen
02aea0690d
async_hooks: minor refactor to callback invocation
...
Re-use the `init` function wherever possible, and move
`try { … } catch` blocks that result in fatal errors to a larger
scope.
Also make the argument order for `init()` consistent in the codebase.
PR-URL: https://github.com/nodejs/node/pull/13419
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-06-08 23:58:48 +02:00
Anna Henningsen
6318078d2c
async_hooks: make sure .{en|dis}able() === this
...
Make sure that `hook.enable()` and `hook.disable()` return `hook`
consistently, as the documentation indicates.
PR-URL: https://github.com/nodejs/node/pull/13418
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-06-08 20:19:35 +02:00
cjihrig
d0571a926a
https: support rejectUnauthorized for unix sockets
...
This commit allows self signed certificates to work with
unix sockets by forwarding the rejectUnauthorized option.
Fixes: https://github.com/nodejs/node/issues/13470
PR-URL: https://github.com/nodejs/node/pull/13505
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-06-08 13:40:20 -04:00
Refael Ackermann
47b9772f52
fs: expose Stats times as Numbers
...
PR-URL: https://github.com/nodejs/node/pull/13173
Fixes: https://github.com/nodejs/node/issues/8276
Refs: https://github.com/nodejs/node/pull/12607
Refs: https://github.com/nodejs/node/pull/12818
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-07 16:15:45 -04:00
Sam Roberts
324f1115b3
lib: return this from net.Socket.end()
...
PR-URL: https://github.com/nodejs/node/pull/13481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-07 12:54:00 -07:00
Fedor Indutny
d6260a8f4b
http: overridable keep-alive behavior of Agent
...
Introduce two overridable `Agent` methods:
* `keepSocketAlive(socket)`
* `reuseSocket(socket, req)`
These methods can be overridden by particular `Agent` class child to
make keep-alive behavior customizable.
Motivation: destroy persisted sockets after some configurable timeout.
It is very non-trivial to do it with available primitives. Such program
will most likely need to poke with undocumented events and methods of
`Agent`. With introduced API such behavior is easy to implement.
PR-URL: https://github.com/nodejs/node/pull/13005
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-07 14:41:22 -04:00
Matteo Collina
07ca288929
fs: replace a bind() with a top-level function
...
https://github.com/nodejs/node/pull/11225 introduce an unnecessary
bind() when closing a stream. This PR replaces that bind() with a
top-level function.
PR-URL: https://github.com/nodejs/node/pull/13474
Reviewed-By: Refael Ackermann <refack@gmail.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: Brian White <mscdex@mscdex.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2017-06-07 13:02:58 +02:00
David Cai
35353a45fc
test: increase coverage of async_hooks
...
PR-URL: https://github.com/nodejs/node/pull/13336
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-06-07 11:02:47 +08:00
Sam Roberts
2791b360c1
inspector: allow --inspect=host:port from js
...
PR-URL: https://github.com/nodejs/node/pull/13228
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-06 14:41:17 -07:00
Sebastian Van Sande
dcfbbacba8
path: use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/11319
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-06 17:20:23 -04:00
Jacob Jones
afc59a9f50
lib: "iff" changed to "if and only if"
...
PR-URL: https://github.com/nodejs/node/pull/13496
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-06 14:38:28 -04:00
Gautam Mittal
3630ed1c82
errors,tty: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/13240
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-06 11:55:15 -04:00
Joseph Gentle
7cddcc9715
assert: fix deepEqual similar sets and maps bug
...
This fixes a bug where deepEqual and deepStrictEqual would have
incorrect behaviour in sets and maps containing multiple equivalent
keys.
PR-URL: https://github.com/nodejs/node/pull/13426
Fixes: https://github.com/nodejs/node/issues/13347
Refs: https://github.com/nodejs/node/pull/12142
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-06-05 18:33:49 -04:00
Brian White
d081548858
net: fix permanent deopt
...
PR-URL: https://github.com/nodejs/node/pull/13384
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-06-05 16:44:15 -04:00