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: nodejs#8712
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ilkka Myller <[email protected]>
  • Loading branch information
danbev committed Sep 24, 2016
1 parent 7458fbb commit 6be43a9
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 6be43a9

Please sign in to comment.