diff options
author | James M Snell <jasnell@gmail.com> | 2017-08-19 08:37:37 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-08-23 20:35:34 +0300 |
commit | 5e7c69716ecbb7a0ebceaed7cc1c6847f9bc5058 (patch) | |
tree | e46aa77686c39196f93a4bf064ca0282188fb67e /src/fs_event_wrap.cc | |
parent | 771a03dfe3dba6ac3136bd4aa25525220e29b0ff (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/fs_event_wrap.cc')
-rw-r--r-- | src/fs_event_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 228c3a344ed..8ec8dd6dcfb 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -94,7 +94,7 @@ void FSEventWrap::Initialize(Local<Object> target, t->InstanceTemplate()->SetInternalFieldCount(1); t->SetClassName(fsevent_string); - env->SetProtoMethod(t, "getAsyncId", AsyncWrap::GetAsyncId); + AsyncWrap::AddWrapMethods(env, t); env->SetProtoMethod(t, "start", Start); env->SetProtoMethod(t, "close", Close); |