Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: prevent object map change in ReadableState #4761

Merged
merged 1 commit into from
Jan 19, 2016

Conversation

evanlucas
Copy link
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 evanlucas added the stream Issues and PRs related to the stream subsystem. label Jan 19, 2016
@bnoordhuis
Copy link
Member

LGTM

@cjihrig
Copy link
Contributor

cjihrig commented Jan 19, 2016

LGTM. Would initializing to false work?

@evanlucas
Copy link
Contributor Author

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

@evanlucas
Copy link
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?

@evanlucas
Copy link
Contributor Author

Ok, updated to use false instead of undefined.

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

@mscdex
Copy link
Contributor

mscdex commented Jan 19, 2016

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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@evanlucas
Copy link
Contributor Author

Landed in df4d209. Thanks!

@evanlucas 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@jasnell
Copy link
Member

jasnell commented Jan 23, 2016

Is this appropriate for LTS?

@evanlucas
Copy link
Contributor Author

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

@MylesBorins
Copy link
Contributor

adding LTS watch tag.

@jasnell
Copy link
Member

jasnell commented Mar 11, 2016

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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
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