aboutsummaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorCalvin Metcalf <cmetcalf@appgeo.com>2017-05-05 15:57:57 +0200
committerMatteo Collina <hello@matteocollina.com>2017-11-15 14:30:39 +0100
commit157df5a47c3aa8951e5dba4f0b05c7a9c7d9ecb1 (patch)
tree402e17f9628dc0590831c5dc836ae37ae0eb2416 /lib/fs.js
parent9c1b18a59f2514e7bccbd07108b5f1f4e6f7c05e (diff)
downloadandroid-node-v8-157df5a47c3aa8951e5dba4f0b05c7a9c7d9ecb1.tar.gz
android-node-v8-157df5a47c3aa8951e5dba4f0b05c7a9c7d9ecb1.tar.bz2
android-node-v8-157df5a47c3aa8951e5dba4f0b05c7a9c7d9ecb1.zip
stream: remove usage of *State.highWaterMark
Replaced _readableState.highWaterMark with a .readableHighWaterMark getter and _writableState.highWaterMark with a .writableHighWaterMark getter. The getters are non-enumerable because they break some prototype manipulation that happen in the ecosystem. Ref: https://github.com/nodejs/node/issues/445. PR-URL: https://github.com/nodejs/node/pull/12860 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 215acf9b24..01edc7411a 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -2072,7 +2072,7 @@ ReadStream.prototype._read = function(n) {
if (!pool || pool.length - pool.used < kMinPoolSpace) {
// discard the old pool.
- allocNewPool(this._readableState.highWaterMark);
+ allocNewPool(this.readableHighWaterMark);
}
// Grab another reference to the pool in the case that while we're