未验证 提交 f6b96bb4 编写于 作者: O openharmony_ci 提交者: Gitee

!9162 cherry pick fix napi xts memleak to 4.0beta1

Merge pull request !9162 from huangzhenghua/cherry-pick-1688097066
......@@ -1997,12 +1997,9 @@ static napi_value napiCancelAsyncWork(napi_env env, napi_callback_info info)
napi_value resourceName = nullptr;
napi_create_string_utf8(env, "AsyncWorkTest", NAPI_AUTO_LENGTH, &resourceName);
napi_create_async_work(env, nullptr, resourceName, [](napi_env value, void* data) {},
[](napi_env env, napi_status status, void* data) {
napi_async_work workData = (napi_async_work)data;
napi_delete_async_work(env, workData);
}, work, &work);
napi_queue_async_work(env, work);
[](napi_env env, napi_status status, void* data) {}, nullptr, &work);
NAPI_CALL(env, napi_cancel_async_work(env, work));
napi_delete_async_work(env, work);
napi_value value;
NAPI_CALL(env, napi_create_int32(env, 0, &value));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册