Browse Source

src: rename handle__ to handle_ in HandleWrap

Commit 46633934fe (src: pull
OnConnection from pipe_wrap and tcp_wrap) removed the private handle_
member from TCPWrap which should allow us to rename the private
handle__ member in HandleWrap.

PR-URL: https://github.com/nodejs/node/pull/8712
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
v6.x
Daniel Bevenius 8 years ago
committed by Jeremiah Senkpiel
parent
commit
41ad6e3965
  1. 6
      src/handle_wrap.cc
  2. 6
      src/handle_wrap.h

6
src/handle_wrap.cc

@ -56,7 +56,7 @@ void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
return;
CHECK_EQ(false, wrap->persistent().IsEmpty());
uv_close(wrap->handle__, OnClose);
uv_close(wrap->handle_, OnClose);
wrap->state_ = kClosing;
if (args[0]->IsFunction()) {
@ -73,8 +73,8 @@ HandleWrap::HandleWrap(Environment* env,
AsyncWrap* parent)
: AsyncWrap(env, object, provider, parent),
state_(kInitialized),
handle__(handle) {
handle__->data = this;
handle_(handle) {
handle_->data = this;
HandleScope scope(env->isolate());
Wrap(object, this);
env->handle_wrap_queue()->PushBack(this);

6
src/handle_wrap.h

@ -47,7 +47,7 @@ class HandleWrap : public AsyncWrap {
return IsAlive(wrap) && uv_has_ref(wrap->GetHandle());
}
inline uv_handle_t* GetHandle() const { return handle__; }
inline uv_handle_t* GetHandle() const { return handle_; }
protected:
HandleWrap(Environment* env,
@ -63,9 +63,7 @@ class HandleWrap : public AsyncWrap {
static void OnClose(uv_handle_t* handle);
ListNode<HandleWrap> handle_wrap_queue_;
enum { kInitialized, kClosing, kClosingWithCallback, kClosed } state_;
// Using double underscore due to handle_ member in tcp_wrap. Probably
// tcp_wrap should rename it's member to 'handle'.
uv_handle_t* const handle__;
uv_handle_t* const handle_;
};

Loading…
Cancel
Save