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 7, 2020
1 parent 8d3f978 commit 6c4c5d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/node-api/test_callback_scope/binding.cc
Original file line number Diff line number Diff line change
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 6c4c5d7

Please sign in to comment.