FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: prevent object map change in ReadableState by evanlucas · Pull Request #4761 · nodejs/node · GitHub

/ node Public

stream: prevent object map change in ReadableState - #4761

Merged
evanlucas merged 1 commit into
nodejs:masterfrom
evanlucas:readabledeopt
Jan 19, 2016
Merged

stream: prevent object map change in ReadableState#4761
evanlucas merged 1 commit into
nodejs:masterfrom
evanlucas:readabledeopt

Conversation

Copy link
Copy Markdown
Contributor

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.

evanlucas added the stream Issues and PRs related to the stream subsystem. label Jan 19, 2016

Copy link
Copy Markdown
Member

LGTM

cjihrig commented Jan 19, 2016

Copy link
Copy Markdown
Contributor

LGTM. Would initializing to false work?

Copy link
Copy Markdown
Contributor Author

Possibly. I'll look more into it and see if there are any reasons to not use false

Copy link
Copy Markdown
Contributor Author

From looking through it, I don't see a reason why we can't use false here. Would that be preferred over undefined?

Copy link
Copy Markdown
Contributor Author

Ok, updated to use false instead of undefined.

CI: https://ci.nodejs.org/job/node-test-pull-request/1304/

mscdex commented Jan 19, 2016

Copy link
Copy Markdown
Contributor

LGTM

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: nodejs#4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
evanlucas closed this Jan 19, 2016
evanlucas deleted the readabledeopt branch January 19, 2016 19:32

Copy link
Copy Markdown
Contributor Author

Landed in df4d209. Thanks!

evanlucas merged commit df4d209 into nodejs:master Jan 19, 2016
evanlucas added a commit that referenced this pull request Jan 19, 2016
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: #4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
evanlucas added a commit that referenced this pull request Jan 20, 2016
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: #4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

jasnell commented Jan 23, 2016

Copy link
Copy Markdown
Member

Is this appropriate for LTS?

Copy link
Copy Markdown
Contributor Author

I don't see why not. It just can prevent a de-opt in a stream.

Copy link
Copy Markdown
Contributor

adding LTS watch tag.

jasnell commented Mar 11, 2016

Copy link
Copy Markdown
Member

SGTM

MylesBorins pushed a commit that referenced this pull request Mar 17, 2016
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: #4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Mar 21, 2016
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: #4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
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: nodejs#4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL