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/async_wrap-inl.h | |
parent | ddcc00bc1e8cc5815c942e1c4713ce92e7a27d40 (diff) | |
download | android-node-v8-d3f174faab55662226ced53bef6bb2040352a825.tar.gz android-node-v8-d3f174faab55662226ced53bef6bb2040352a825.tar.bz2 android-node-v8-d3f174faab55662226ced53bef6bb2040352a825.zip |
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/async_wrap-inl.h')
-rw-r--r-- | src/async_wrap-inl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/async_wrap-inl.h b/src/async_wrap-inl.h index cc6377d82a..21b1f9cee9 100644 --- a/src/async_wrap-inl.h +++ b/src/async_wrap-inl.h @@ -64,6 +64,13 @@ inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback( return MakeCallback(cb_v.As<v8::Function>(), argc, argv); } + +// Defined here to avoid a circular dependency with env-inl.h. +inline Environment::AsyncHooks::DefaultTriggerAsyncIdScope + ::DefaultTriggerAsyncIdScope(AsyncWrap* async_wrap) + : DefaultTriggerAsyncIdScope(async_wrap->env(), + async_wrap->get_async_id()) {} + } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |