From 8b18bcf8a854ffd2d2ad354a6c90dd1b032b497c Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 28 Apr 2020 04:49:39 +0200 Subject: [PATCH] test: add missing calls to napi_async_destroy --- test/node-api/test_callback_scope/binding.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/node-api/test_callback_scope/binding.cc b/test/node-api/test_callback_scope/binding.cc index 153428a65bd6e4..a8a755a016a7ee 100644 --- a/test/node-api/test_callback_scope/binding.cc +++ b/test/node-api/test_callback_scope/binding.cc @@ -47,6 +47,7 @@ napi_value RunInCallbackScope(napi_env env, napi_callback_info info) { } NAPI_CALL(env, napi_close_callback_scope(env, scope)); + NAPI_CALL(env, napi_async_destroy(env, context)); return result; } @@ -85,6 +86,7 @@ static void Callback(uv_work_t* req, int ignored) { NAPI_CALL_RETURN_VOID(env, napi_close_callback_scope(env, scope)); NAPI_CALL_RETURN_VOID(env, napi_close_handle_scope(env, handle_scope)); + NAPI_CALL_RETURN_VOID(env, napi_async_destroy(env, context)); delete req; }