summaryrefslogtreecommitdiff
path: root/src/tcp_wrap.cc
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-12-11 17:55:17 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-18 09:58:02 -0500
commitd36e1b4fed57b34d93e70d3408d753e00b8ed754 (patch)
tree03e0a12b194453231ad7391ff16b2c7cf3a489f2 /src/tcp_wrap.cc
parent68c63a9fa362138bed852714862ac37b85c06adb (diff)
downloadandroid-node-v8-d36e1b4fed57b34d93e70d3408d753e00b8ed754.tar.gz
android-node-v8-d36e1b4fed57b34d93e70d3408d753e00b8ed754.tar.bz2
android-node-v8-d36e1b4fed57b34d93e70d3408d753e00b8ed754.zip
net,src: refactor writeQueueSize tracking
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: https://github.com/nodejs/node/pull/17650 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/tcp_wrap.cc')
-rw-r--r--src/tcp_wrap.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc
index 8dd14e2e16..aa0cb7ed17 100644
--- a/src/tcp_wrap.cc
+++ b/src/tcp_wrap.cc
@@ -169,7 +169,6 @@ TCPWrap::TCPWrap(Environment* env, Local<Object> object, ProviderType provider)
int r = uv_tcp_init(env->event_loop(), &handle_);
CHECK_EQ(r, 0); // How do we proxy this error up to javascript?
// Suggestion: uv_tcp_init() returns void.
- UpdateWriteQueueSize();
}