diff options
author | Jon Moss <me@jonathanmoss.me> | 2018-07-11 20:53:05 +0300 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2018-07-13 19:08:20 +0300 |
commit | 45732c7c19672869a7e517e252c83b371a863bee (patch) | |
tree | 14b333f5a45f53bec769cd0b60c2201b1ba46049 /src/timer_wrap.cc | |
parent | d2ee7d64aa3afd593ec8c0b14f497244403c5589 (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/timer_wrap.cc')
-rw-r--r-- | src/timer_wrap.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index b87430dad8a..9da209bef48 100644 --- a/src/timer_wrap.cc +++ b/src/timer_wrap.cc @@ -55,11 +55,7 @@ class TimerWrap : public HandleWrap { env->SetTemplateMethod(constructor, "now", Now); AsyncWrap::AddWrapMethods(env, constructor); - - env->SetProtoMethod(constructor, "close", HandleWrap::Close); - env->SetProtoMethod(constructor, "ref", HandleWrap::Ref); - env->SetProtoMethod(constructor, "unref", HandleWrap::Unref); - env->SetProtoMethod(constructor, "hasRef", HandleWrap::HasRef); + HandleWrap::AddWrapMethods(env, constructor); env->SetProtoMethod(constructor, "start", Start); |