Skip to content

Commit

Permalink
test: add missing calls to napi_async_destroy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax authored and targos committed May 13, 2020
1 parent ffca498 commit 08e01a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/node-api/test_callback_scope/binding.cc
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 08e01a1

Please sign in to comment.