stream: prevent object map change in ReadableState
authorEvan Lucas <evanlucas@me.com>
Tue, 19 Jan 2016 14:53:38 +0000 (08:53 -0600)
committerMyles Borins <mborins@us.ibm.com>
Mon, 21 Mar 2016 19:57:53 +0000 (12:57 -0700)
commitfb5ba6b9289e5651886888a1885ca8c18f322430
tree1ba58b4cada1da43e6fe222181a1c31f1834af53
parent7c3b844f7850c9ff999488e1a4e30de08d9331dc
stream: prevent object map change in ReadableState

ReadableState has the resumeScheduled property that helps determine if
a stream should be resumed. It was not assigned in the constructor.
When stream.resume is called on a readable stream that is not flowing,
it is set to true. This changes the property map of the ReadableState
which can cause a deopt in onEofChunk and needMoreData.

PR-URL: https://github.com/nodejs/node/pull/4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
lib/_stream_readable.js