!1435 增加判空

Merge pull request !1435 from weimengxue/master
This commit is contained in:
openharmony_ci 2024-10-12 04:24:28 +00:00 committed by Gitee
commit 570eefa2ae
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
17 changed files with 22 additions and 17 deletions

View File

@ -375,7 +375,13 @@ napi_value NAPIRemoteObject::ThenCallback(napi_env env, napi_callback_info info)
napi_value argv[ARGV_LENGTH_1] = {nullptr}; napi_value argv[ARGV_LENGTH_1] = {nullptr};
void* data = nullptr; void* data = nullptr;
napi_get_cb_info(env, info, &argc, argv, nullptr, &data); napi_get_cb_info(env, info, &argc, argv, nullptr, &data);
napi_value res;
CallbackParam *param = static_cast<CallbackParam *>(data); CallbackParam *param = static_cast<CallbackParam *>(data);
if (param == nullptr) {
ZLOGE(LOG_LABEL, "param is null");
napi_get_undefined(env, &res);
return res;
}
bool result = false; bool result = false;
napi_get_value_bool(param->env, argv[ARGV_INDEX_0], &result); napi_get_value_bool(param->env, argv[ARGV_INDEX_0], &result);
if (!result) { if (!result) {
@ -391,7 +397,6 @@ napi_value NAPIRemoteObject::ThenCallback(napi_env env, napi_callback_info info)
std::unique_lock<std::mutex> lock(param->lockInfo->mutex); std::unique_lock<std::mutex> lock(param->lockInfo->mutex);
param->lockInfo->ready = true; param->lockInfo->ready = true;
param->lockInfo->condition.notify_all(); param->lockInfo->condition.notify_all();
napi_value res;
napi_get_undefined(env, &res); napi_get_undefined(env, &res);
return res; return res;
} }

View File

@ -49,7 +49,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":GetFeatureSizeFuzzTest", # ":GetFeatureSizeFuzzTest",
] ]
} }

View File

@ -50,7 +50,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":GetRpcFeatureAckFuzzTest", # ":GetRpcFeatureAckFuzzTest",
] ]
} }

View File

@ -49,7 +49,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":GetTokenFromDataFuzzTest", # ":GetTokenFromDataFuzzTest",
] ]
} }

View File

@ -50,7 +50,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":GetTokenIdSizeFuzzTest", # ":GetTokenIdSizeFuzzTest",
] ]
} }

View File

@ -49,7 +49,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":IsATEnableFuzzTest", # ":IsATEnableFuzzTest",
] ]
} }

View File

@ -50,7 +50,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":IsFeatureAckFuzzTest", # ":IsFeatureAckFuzzTest",
] ]
} }

View File

@ -50,7 +50,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":SetFeatureTransDataFuzzTest", # ":SetFeatureTransDataFuzzTest",
] ]
} }

View File

@ -52,7 +52,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":BufferObjectFuzzTest", # ":BufferObjectFuzzTest",
] ]
} }

View File

@ -49,7 +49,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":CloseDatabusSessionFuzzTest", # ":CloseDatabusSessionFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -43,7 +43,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":DBinderServiceFuzzTest", # ":DBinderServiceFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -46,7 +46,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":DetachProxyObjectFuzzTest", # ":DetachProxyObjectFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -45,7 +45,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":LoadSystemAbilityCompleteFuzzTest", # ":LoadSystemAbilityCompleteFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -43,7 +43,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":NoticeDeviceDieFuzzTest", # ":NoticeDeviceDieFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -43,7 +43,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":NoticeServiceDieFuzzTest", # ":NoticeServiceDieFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -46,7 +46,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":OnBytesReceivedFuzzTest", # ":OnBytesReceivedFuzzTest",
] ]
} }
############################################################################### ###############################################################################

View File

@ -46,7 +46,7 @@ group("fuzztest") {
deps = [] deps = []
deps += [ deps += [
# deps file # deps file
#":SendDataToRemoteFuzzTest", # ":SendDataToRemoteFuzzTest",
] ]
} }
############################################################################### ###############################################################################