Skip to content

Commit 08e01a1

Browse files
addaleaxtargos
authored andcommitted
test: add missing calls to napi_async_destroy
PR-URL: #33114 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
1 parent ffca498 commit 08e01a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/node-api/test_callback_scope/binding.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ napi_value RunInCallbackScope(napi_env env, napi_callback_info info) {
4747
}
4848

4949
NAPI_CALL(env, napi_close_callback_scope(env, scope));
50+
NAPI_CALL(env, napi_async_destroy(env, context));
5051

5152
return result;
5253
}
@@ -85,6 +86,7 @@ static void Callback(uv_work_t* req, int ignored) {
8586
NAPI_CALL_RETURN_VOID(env, napi_close_callback_scope(env, scope));
8687

8788
NAPI_CALL_RETURN_VOID(env, napi_close_handle_scope(env, handle_scope));
89+
NAPI_CALL_RETURN_VOID(env, napi_async_destroy(env, context));
8890
delete req;
8991
}
9092

0 commit comments

Comments
 (0)