stream: rm {writeable/readable}State.length

As part of the readableState/writableState mega issue #445, this
removes all of the references to .length on those properties and
replaces them with a readableLength and writableLength getter.

See: https://github.com/nodejs/node/issues/445
PR-URL: https://github.com/nodejs/node/pull/12857
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Calvin Metcalf authored and Matteo Collina committed 2017-12-18 14:41:43 +01:00
1 parent 0a28f94df6
commit 36ffa21af2
16 files changed
+75 -17

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ function httpsTest() {
const test = common.mustCall(function(res) {
res.on('end', common.mustCall(function() {
assert.strictEqual(res._readableState.length, 0);
assert.strictEqual(res.readableLength, 0);
assert.strictEqual(bytes, data.length);
}));