Signed-off-by: sodanotgreen <limengzheng@huawei.com>
This commit is contained in:
sodanotgreen 2024-07-30 17:36:25 +08:00
parent feda05523f
commit 543665939d
2 changed files with 6 additions and 6 deletions

View File

@ -388,13 +388,13 @@ napi_value NAPI_PrintDrawnCompletedWrap(napi_env env, napi_callback_info info, A
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, &jsthis, &data));
if (argc > ARGS_ONE) {
TAG_LOGE(AAFwkTag::JSNAPI, "arguments is invalid");
TAG_LOGE(AAFwkTag::JSNAPI, "invalid argc");
return nullptr;
}
if (argc == ARGS_ONE) {
if (!CreateAsyncCallback(env, args[PARAM0], asyncCallbackInfo)) {
TAG_LOGI(AAFwkTag::JSNAPI, "the first argument is invalid");
TAG_LOGI(AAFwkTag::JSNAPI, "args[PARAM0] invalid");
return nullptr;
}
}

View File

@ -116,12 +116,12 @@ bool CheckAbilityType(const AsyncJSCallbackInfo *asyncCallbackInfo)
{
TAG_LOGI(AAFwkTag::JSNAPI, "start");
if (asyncCallbackInfo == nullptr) {
TAG_LOGE(AAFwkTag::JSNAPI, "asyncCallbackInfo == null");
TAG_LOGE(AAFwkTag::JSNAPI, "null asyncCallbackInfo");
return false;
}
if (asyncCallbackInfo->ability == nullptr) {
TAG_LOGE(AAFwkTag::JSNAPI, "ability == null");
TAG_LOGE(AAFwkTag::JSNAPI, "null ability");
return false;
}
@ -294,7 +294,7 @@ void GetFilesDirExecuteCallback(napi_env, void *data)
asyncCallbackInfo->error_code = NAPI_ERR_NO_ERROR;
asyncCallbackInfo->native_data.data_type = NVT_NONE;
if (asyncCallbackInfo->ability == nullptr) {
TAG_LOGE(AAFwkTag::JSNAPI, "ability == null");
TAG_LOGE(AAFwkTag::JSNAPI, "null ability");
asyncCallbackInfo->error_code = NAPI_ERR_ACE_ABILITY;
return;
}
@ -477,7 +477,7 @@ void GetExternalCacheDirExecuteCallback(napi_env, void *data)
asyncCallbackInfo->error_code = NAPI_ERR_NO_ERROR;
asyncCallbackInfo->native_data.data_type = NVT_NONE;
if (asyncCallbackInfo->ability == nullptr) {
TAG_LOGE(AAFwkTag::JSNAPI, "ability == null");
TAG_LOGE(AAFwkTag::JSNAPI, "null ability");
asyncCallbackInfo->error_code = NAPI_ERR_ACE_ABILITY;
return;
}