Skip to content

Commit

Permalink
src: rename handle__ to handle_ in HandleWrap
Browse files Browse the repository at this point in the history
Commit 4663393 (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: #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>
  • Loading branch information
danbev authored and Fishrock123 committed Oct 11, 2016
1 parent 999f727 commit 41ad6e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/handle_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions src/handle_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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_;
};


Expand Down

0 comments on commit 41ad6e3

Please sign in to comment.