node/lib
Anna Henningsen 91694497ba
src: refactor WriteWrap and ShutdownWraps
Encapsulate stream requests more:

- `WriteWrap` and `ShutdownWrap` classes are now tailored to the
  streams on which they are used. In particular, for most streams
  these are now plain `AsyncWrap`s and do not carry the overhead
  of unused libuv request data.
- Provide generic `Write()` and `Shutdown()` methods that wrap
  around the actual implementations, and make *usage* of streams
  easier, rather than implementing; for example, wrap objects
  don’t need to be provided by callers anymore.
- Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to
  call the corresponding JS handlers, rather than always trying
  to call them. This makes usage of streams by other C++ code
  easier and leaner.

Also fix up some tests that were previously not actually testing
asynchronicity when the comments indicated that they would.

PR-URL: https://github.com/nodejs/node/pull/18676
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-27 17:56:01 +01:00
..
internal src: refactor WriteWrap and ShutdownWraps 2018-02-27 17:56:01 +01:00
.eslintrc.yaml test,benchmark,doc: enable dot-notation rule 2018-02-21 18:12:26 -05:00
_http_agent.js http: allow _httpMessage to be GC'ed 2018-02-26 23:42:45 +01:00
_http_client.js http: remove default 'drain' listener on upgrade 2018-02-26 23:42:46 +01:00
_http_common.js http: simplify checkInvalidHeaderChar 2018-02-21 14:20:31 -05:00
_http_incoming.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
_http_outgoing.js http: switch on string values 2018-02-21 10:18:44 -05:00
_http_server.js src: refactor stream callbacks and ownership 2018-02-26 18:39:41 -05:00
_stream_duplex.js stream: rm {writeable/readable}State.length 2018-01-09 03:17:35 -05:00
_stream_passthrough.js
_stream_readable.js lib: switch to Number.isNaN 2018-02-21 14:20:28 -05:00
_stream_transform.js stream: delete unused code 2018-02-21 10:19:09 -05:00
_stream_wrap.js lib: move _stream_wrap into internals 2017-10-19 18:06:27 +02:00
_stream_writable.js stream: fix misleading error message 2018-02-21 14:20:02 -05:00
_tls_common.js tls: implement clientCertEngine option 2017-12-11 15:39:08 -05:00
_tls_legacy.js tls: comment about old-style errors 2018-01-09 04:32:28 -05:00
_tls_wrap.js net,src: refactor writeQueueSize tracking 2018-02-20 16:02:30 -05:00
assert.js assert: fix .throws operator 2018-01-08 02:21:03 -05:00
async_hooks.js lib: provide proper deprecation code 2018-02-21 14:20:21 -05:00
buffer.js lib: switch to Number.isNaN 2018-02-21 14:20:28 -05:00
child_process.js util: implement util.getSystemErrorName() 2018-02-26 18:39:48 -05:00
cluster.js
console.js tools: non-Ascii linter for /lib only 2018-02-21 10:19:15 -05:00
constants.js
crypto.js crypto: migrate setFipsCrypto to internal/errors 2017-10-27 08:13:01 -07:00
dgram.js errors: move error creation helpers to errors.js 2018-02-26 18:39:49 -05:00
dns.js errors: move error creation helpers to errors.js 2018-02-26 18:39:49 -05:00
domain.js domain: further abstract usage in C++ 2018-02-21 10:18:44 -05:00
events.js events: preset usingDomains to false 2018-02-22 20:34:31 -05:00
fs.js errors: move error creation helpers to errors.js 2018-02-26 18:39:49 -05:00
http.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
http2.js
https.js https: add extra options to Agent#getName() 2018-02-21 14:20:07 -05:00
inspector.js lib: enable dot-notation eslint rule 2018-01-10 01:42:28 -05:00
module.js inspector: --inspect-brk for es modules 2018-02-21 10:18:42 -05:00
net.js src: refactor WriteWrap and ShutdownWraps 2018-02-27 17:56:01 +01:00
os.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
path.js path: replace duplicate conditions by functions 2018-02-21 18:12:31 -05:00
perf_hooks.js perf_hooks: add warning when too many entries in the timeline 2018-02-21 10:18:50 -05:00
process.js
punycode.js
querystring.js querystring: convert to using internal/errors 2017-10-28 14:04:53 -04:00
readline.js lib: switch to Number.isNaN 2018-02-21 14:20:28 -05:00
repl.js repl: fix tab-complete warning 2018-02-26 23:42:45 +01:00
stream.js tools: non-Ascii linter for /lib only 2018-02-21 10:19:15 -05:00
string_decoder.js string_decoder: reset decoder on end 2018-02-21 10:19:08 -05:00
sys.js
timers.js timers: allow Immediates to be unrefed 2018-02-26 18:39:45 -05:00
tls.js doc: document tls.checkServerIdentity 2017-12-12 03:28:03 -05:00
tty.js errors: move error creation helpers to errors.js 2018-02-26 18:39:49 -05:00
url.js url: reduce deplicated codes in autoEscapeStr 2018-02-26 23:42:47 +01:00
util.js errors: move error creation helpers to errors.js 2018-02-26 18:39:49 -05:00
v8.js v8: migrate setFlagsFromString to internal/errors 2017-10-29 23:07:52 -07:00
vm.js vm: consolidate validation 2018-02-26 23:42:43 +01:00
zlib.js lib: switch to Number.isNaN 2018-02-21 14:20:28 -05:00