diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-03-07 13:48:52 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-03-11 18:20:38 +0100 |
commit | d3f174faab55662226ced53bef6bb2040352a825 (patch) | |
tree | 06724215b97d8efa9ce0538a5113b1bdb2766827 /src/udp_wrap.cc | |
parent | ddcc00bc1e8cc5815c942e1c4713ce92e7a27d40 (diff) | |
download | node-new-d3f174faab55662226ced53bef6bb2040352a825.tar.gz |
src: add convenience ctor for async trigger id scope
PR-URL: https://github.com/nodejs/node/pull/19204
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r-- | src/udp_wrap.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 27be93abd0..e7d97dc484 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -359,8 +359,7 @@ void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) { SendWrap* req_wrap; { - AsyncHooks::DefaultTriggerAsyncIdScope trigger_scope( - env, wrap->get_async_id()); + AsyncHooks::DefaultTriggerAsyncIdScope trigger_scope(wrap); req_wrap = new SendWrap(env, req_wrap_obj, have_callback); } size_t msg_size = 0; @@ -511,8 +510,7 @@ Local<Object> UDPWrap::Instantiate(Environment* env, AsyncWrap* parent, UDPWrap::SocketType type) { EscapableHandleScope scope(env->isolate()); - AsyncHooks::DefaultTriggerAsyncIdScope trigger_scope( - env, parent->get_async_id()); + AsyncHooks::DefaultTriggerAsyncIdScope trigger_scope(parent); // If this assert fires then Initialize hasn't been called yet. CHECK_EQ(env->udp_constructor_function().IsEmpty(), false); |