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:
authorJames M Snell <jasnell@gmail.com>2017-08-19 08:37:37 +0300
committerJames M Snell <jasnell@gmail.com>2017-08-23 20:35:34 +0300
commit5e7c69716ecbb7a0ebceaed7cc1c6847f9bc5058 (patch)
treee46aa77686c39196f93a4bf064ca0282188fb67e /src/process_wrap.cc
parent771a03dfe3dba6ac3136bd4aa25525220e29b0ff (diff)
src: reduce code duplication
Adds `AsyncWrap::AddWrapMethods()` to add common methods to a `Local<FunctionTemplate>`. Follows same pattern as stream base. PR-URL: https://github.com/nodejs/node/pull/14937 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/process_wrap.cc')
-rw-r--r--src/process_wrap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 26e233b2bd0..7accc8c129e 100644
--- a/src/process_wrap.cc
+++ b/src/process_wrap.cc
@@ -57,7 +57,7 @@ class ProcessWrap : public HandleWrap {
FIXED_ONE_BYTE_STRING(env->isolate(), "Process");
constructor->SetClassName(processString);
- env->SetProtoMethod(constructor, "getAsyncId", AsyncWrap::GetAsyncId);
+ AsyncWrap::AddWrapMethods(env, constructor);
env->SetProtoMethod(constructor, "close", HandleWrap::Close);