diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-11-18 14:54:06 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-11-21 12:50:06 +0100 |
commit | 5d7f5c16b3ae49325b7bb0a79eaba3e945585ced (patch) | |
tree | acca78da096b0ac5f645330399a7b0d2ef87d412 /src/async_wrap.cc | |
parent | 85f3e319c40dfe5b89d1f31a69ac8f3d9cf291b2 (diff) | |
download | android-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.tar.gz android-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.tar.bz2 android-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.zip |
src: remove async_hooks destroy timer handle
PR-URL: https://github.com/nodejs/node/pull/17117
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/async_wrap.cc')
-rw-r--r-- | src/async_wrap.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 7410557d2e..b1a8f689ab 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -137,11 +137,7 @@ RetainedObjectInfo* WrapperInfo(uint16_t class_id, Local<Value> wrapper) { // end RetainedAsyncInfo -static void DestroyAsyncIdsCallback(uv_timer_t* handle) { - Environment* env = Environment::from_destroy_async_ids_timer_handle(handle); - - HandleScope handle_scope(env->isolate()); - Context::Scope context_scope(env->context()); +static void DestroyAsyncIdsCallback(Environment* env, void* data) { Local<Function> fn = env->async_hooks_destroy_function(); TryCatch try_catch(env->isolate()); @@ -689,8 +685,7 @@ void AsyncWrap::EmitDestroy(Environment* env, double async_id) { return; if (env->destroy_async_id_list()->empty()) { - uv_timer_start(env->destroy_async_ids_timer_handle(), - DestroyAsyncIdsCallback, 0, 0); + env->SetImmediate(DestroyAsyncIdsCallback, nullptr); } env->destroy_async_id_list()->push_back(async_id); |