Skip to content

Conversation

@addaleax
Copy link
Member

/cc @apapirovski

Only merge conflict was a trivial one in src/tty_wrap.cc


Currently, writeQueueSize is never used in C++ and barely used
within JS. Instead of constantly updating the value on the JS
object, create a getter that will retrieve the most up-to-date
value from C++.

For the vast majority of cases though, create a new prop on
Socket.prototype[kLastWriteQueueSize] using a Symbol. Use this
to track the current write size, entirely in JS land.

PR-URL: #17650

Currently, writeQueueSize is never used in C++ and barely used within JS. Instead of constantly updating the value on the JS object, create a getter that will retrieve the most up-to-date value from C++. For the vast majority of cases though, create a new prop on Socket.prototype[kLastWriteQueueSize] using a Symbol. Use this to track the current write size, entirely in JS land. PR-URL: nodejs#17650
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. v9.x labels Jan 10, 2018
Copy link
Contributor

@apapirovskiapapirovski left a comment

Choose a reason for hiding this comment

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

LGTM. Looks like the conflict had to do with switching errors to be emitted from JS or something like that?

Thanks for doing this btw!

@addaleax
Copy link
MemberAuthor

@apapirovski Yup, exactly that. :) No problem!

@addaleax
Copy link
MemberAuthor

@evanlucas
Copy link
Contributor

It looks like this no longer lands cleanly after landing #18079 on v9.x-staging. Any chance you could rebase? Thanks!

MylesBorins pushed a commit that referenced this pull request Feb 20, 2018
Currently, writeQueueSize is never used in C++ and barely used within JS. Instead of constantly updating the value on the JS object, create a getter that will retrieve the most up-to-date value from C++. For the vast majority of cases though, create a new prop on Socket.prototype[kLastWriteQueueSize] using a Symbol. Use this to track the current write size, entirely in JS land. Backport-PR-URL: #18084 PR-URL: #17650 Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins
Copy link
Contributor

Got this to land cleanly... landed in 25ce458

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@addaleax@evanlucas@MylesBorins@apapirovski@jasnell@nodejs-github-bot