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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
  • Loading branch information
addaleax authored and targos committed May 4, 2020
1 parent de643bc commit 9ccb6b2
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 9ccb6b2

Please sign in to comment.