From 9ccb6b2e8c1fd78e97bed360b45dfc62448a1962 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/33114 Reviewed-By: Chengzhong Wu Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Gerhard Stöbich --- 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; }