mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-26 17:50:36 +00:00
delete context
Change-Id: I4fbe84c5ae6baa921e20a5cbdae5086e2913fb0a Signed-off-by: hanxuejian <hanxuejian3@huawei.com>
This commit is contained in:
parent
26b2329b6a
commit
c02e2f969d
@ -158,6 +158,8 @@ napi_value NapiCreateAsyncWork3(const AsyncPara ¶, AsyncContextType *asyncCo
|
||||
if (errCode.has_value()) {
|
||||
JsError error = NapiUtil::ConverErrorMessageForJs(errCode.value());
|
||||
NapiUtil::ThrowError(env, error.errorCode, error.errorMessage);
|
||||
delete asyncContext;
|
||||
asyncContext = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@ -165,6 +167,8 @@ napi_value NapiCreateAsyncWork3(const AsyncPara ¶, AsyncContextType *asyncCo
|
||||
if (errCode.has_value()) {
|
||||
JsError error = NapiUtil::ConverErrorMessageForJs(errCode.value());
|
||||
NapiUtil::ThrowError(env, error.errorCode, error.errorMessage);
|
||||
delete asyncContext;
|
||||
asyncContext = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user