mirror of
https://gitee.com/openharmony/print_print_fwk
synced 2024-11-26 18:40:40 +00:00
校正参数校验问题
Signed-off-by: zheng_zhi_hao <zhengzhihao3@huawei.com>
This commit is contained in:
parent
473c82b39e
commit
55390e23fa
@ -761,8 +761,8 @@ napi_value NapiInnerPrint::NotifyPrintServiceEvent(napi_env env, napi_callback_i
|
|||||||
napi_valuetype valuetype;
|
napi_valuetype valuetype;
|
||||||
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ZERO], &valuetype), napi_invalid_arg);
|
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ZERO], &valuetype), napi_invalid_arg);
|
||||||
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ONE], &valuetype), napi_invalid_arg);
|
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ONE], &valuetype), napi_invalid_arg);
|
||||||
std::string jobId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZERO]);
|
uint32_t event = NapiPrintUtils::GetUint32FromValue(env, argv[NapiPrintUtils::INDEX_ZERO]);
|
||||||
uint32_t event = NapiPrintUtils::GetUint32FromValue(env, argv[NapiPrintUtils::INDEX_ONE]);
|
std::string jobId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ONE]);
|
||||||
PRINT_HILOGI("jobId: %{public}s, event : %{public}d", jobId.c_str(), event);
|
PRINT_HILOGI("jobId: %{public}s, event : %{public}d", jobId.c_str(), event);
|
||||||
if (!IsValidApplicationEvent(event)) {
|
if (!IsValidApplicationEvent(event)) {
|
||||||
PRINT_HILOGE("invalid event");
|
PRINT_HILOGE("invalid event");
|
||||||
|
Loading…
Reference in New Issue
Block a user