Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2018-07-11 20:53:05 +0300
committerJon Moss <me@jonathanmoss.me>2018-07-13 19:08:20 +0300
commit45732c7c19672869a7e517e252c83b371a863bee (patch)
tree14b333f5a45f53bec769cd0b60c2201b1ba46049 /src/pipe_wrap.cc
parentd2ee7d64aa3afd593ec8c0b14f497244403c5589 (diff)
src: add HandleWrap::AddWrapMethods
Extracts common setters to a single location PR-URL: https://github.com/nodejs/node/pull/21769 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r--src/pipe_wrap.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index e2cc114479d..a6044b6b267 100644
--- a/src/pipe_wrap.cc
+++ b/src/pipe_wrap.cc
@@ -77,12 +77,7 @@ void PipeWrap::Initialize(Local<Object> target,
t->InstanceTemplate()->SetInternalFieldCount(1);
AsyncWrap::AddWrapMethods(env, t);
-
- env->SetProtoMethod(t, "close", HandleWrap::Close);
- env->SetProtoMethod(t, "unref", HandleWrap::Unref);
- env->SetProtoMethod(t, "ref", HandleWrap::Ref);
- env->SetProtoMethod(t, "hasRef", HandleWrap::HasRef);
-
+ HandleWrap::AddWrapMethods(env, t);
LibuvStreamWrap::AddMethods(env, t);
env->SetProtoMethod(t, "bind", Bind);