0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Miklos Suveges 1c07ebfd97 stream: inline needMoreData function
Inline the needMoreData function since it has only one call place.
Update the related comment.
Add a test for the edge case where HWM=0 and state.length=0.
Add a test for ReadableStream.read(n) method's edge case where
n, HWM and state.length are all zero.
This proves that there is no easy way to simplify the check at
https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L440

Fixes: https://github.com/nodejs/node/issues/19893
Refs: https://github.com/nodejs/node/pull/19896

PR-URL: https://github.com/nodejs/node/pull/21009
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-02 14:18:40 +02:00
..
internal lib: unmask mode_t values with 0o777 2018-06-01 11:12:10 +02:00
_http_agent.js http: do not rely on the 'agentRemove' event 2018-05-22 12:10:22 +04:00
_http_client.js http: do not rely on the 'agentRemove' event 2018-05-22 12:10:22 +04:00
_http_common.js http: remove duplicate parser unset 2018-04-23 15:59:28 +02:00
_http_incoming.js http: added aborted property to request 2018-04-26 19:38:27 +02:00
_http_outgoing.js http: refactor outgoing headers processing 2018-04-27 20:31:25 +02:00
_http_server.js http: fix res emit close before user finish 2018-05-24 13:23:57 -04:00
_stream_duplex.js stream: only check options once in Duplex ctor 2018-04-28 17:13:55 +02:00
_stream_passthrough.js
_stream_readable.js stream: inline needMoreData function 2018-06-02 14:18:40 +02:00
_stream_transform.js
_stream_wrap.js
_stream_writable.js stream: simplify writable's validChunk() 2018-05-14 13:30:56 -04:00
_tls_common.js tls: specify options.name in validateKeyCert 2018-04-27 07:12:26 +02:00
_tls_wrap.js tls: throw if SNICallback is not a function 2018-05-31 09:35:07 +02:00
.eslintrc.yaml tools: stricter eslint rule for globals 2018-05-18 15:27:29 +02:00
assert.js assert: handle undefined filename in getErrMessage 2018-05-23 08:40:10 -07:00
async_hooks.js
buffer.js errors: validate input arguments 2018-04-13 19:59:44 +02:00
child_process.js child_process: fix exec set stdout.setEncoding 2018-05-18 15:20:28 +02:00
cluster.js
console.js lib,src: use V8 API for collection inspection 2018-05-19 01:02:14 +02:00
constants.js constants: freeze the constants object 2018-05-07 14:26:11 +02:00
crypto.js
dgram.js dns: lazy loaded 2018-05-18 15:25:42 +02:00
dns.js errors: alter ERR_INVALID_IP_ADDRESS 2018-04-14 10:55:35 -07:00
domain.js domain: converted anonymous to named function 2018-04-17 23:44:14 -07:00
events.js events: optimize condition for optimal scenario 2018-05-03 14:45:09 +02:00
fs.js lib: unmask mode_t values with 0o777 2018-06-01 11:12:10 +02:00
http2.js
http.js
https.js https: defines maxHeadersCount in the constructor 2018-05-05 13:57:07 +02:00
inspector.js
module.js
net.js net: use object destructuring 2018-06-01 11:01:45 +02:00
os.js lib: remove unnecessary assignment of exports 2018-04-22 11:39:16 +02:00
path.js
perf_hooks.js
process.js
punycode.js
querystring.js
readline.js repl: changes ctrl+u to delete from cursor to line start 2018-05-18 15:56:14 +02:00
repl.js Revert "repl: add friendly tips about how to exit repl" 2018-05-28 13:53:26 -04:00
stream.js stream: add pipeline and finished 2018-04-16 16:02:12 +02:00
string_decoder.js
sys.js
timers.js timers: add hasRef method to Timeout & Immediate 2018-06-01 10:29:51 +02:00
tls.js doc: fix inconsistent documentation (host vs hostname) 2018-06-01 11:10:50 +02:00
trace_events.js trace_events: adds a new trace_events api 2018-04-17 08:30:20 -07:00
tty.js readline: lazy loaded 2018-05-18 15:25:40 +02:00
url.js lib: remove unnecessary require 2018-05-18 15:32:05 +02:00
util.js lib: use focused ESLint disabling in util.js 2018-06-02 00:15:51 +02:00
v8.js lib: remove unnecessary assignment of exports 2018-04-22 11:39:16 +02:00
vm.js lib: introduce internal/validators 2018-04-26 19:42:48 +02:00
zlib.js zlib: fix windowBits validation to allow 0 for decompression mode 2018-04-10 00:56:10 +02:00