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

net: don't throw on bytesWritten access #3305

Closed
wants to merge 1 commit into from

Conversation

trevnorris
Copy link
Contributor

If bytesWritten is accessed before the object has been properly
constructed then return undefined.

Fixes: #3298

R=@bnoordhuis

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

@mscdex mscdex added the net Issues and PRs related to the net subsystem. label Oct 9, 2015
tls.TLSSocket.prototype.bytesWritten;
tty.ReadStream.super_.prototype.bytesWritten;
tty.ReadStream.prototype.bytesWritten;
tty.WriteStream.prototype.bytesWritten;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd check that they're strictEqual to undefined. Apart from that LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good call.

If bytesWritten is accessed before the object has been properly
constructed then return undefined.

Fixes: nodejs#3298
trevnorris added a commit that referenced this pull request Oct 12, 2015
If bytesWritten is accessed before the object has been properly
constructed then return undefined.

Fixes: #3298
PR-URL: #3305
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@trevnorris
Copy link
Contributor Author

Thanks. Landed on a713024

@trevnorris trevnorris closed this Oct 12, 2015
@trevnorris trevnorris deleted the fix-byteswritten-access branch October 12, 2015 14:34
trevnorris added a commit that referenced this pull request Oct 12, 2015
If bytesWritten is accessed before the object has been properly
constructed then return undefined.

Fixes: #3298
PR-URL: #3305
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@trevnorris
Copy link
Contributor Author

landed in v4.x-staging in 01cb3fc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants