mirror of
https://gitee.com/openharmony/napi_generator
synced 2024-11-30 12:10:39 +00:00
modify pxt valid judgement repeat
Signed-off-by: zhaojunxia <zhaojunxia@kaihong.com>
This commit is contained in:
parent
855d9773b4
commit
679e2f98c2
@ -68,9 +68,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
[unwarp_instance]
|
||||
struct [funcName]_value_struct *vio = new [funcName]_value_struct();
|
||||
[valueCheckout][optionalCallbackInit][start_async]
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
return result;
|
||||
}`
|
||||
|
||||
|
@ -45,9 +45,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
napi_value result = nullptr;
|
||||
[valuePackage][optionalParamDestory]
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}`
|
||||
|
@ -50,9 +50,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
|
||||
napi_value result = pxt->UndefinedValue();
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}
|
||||
|
@ -64,9 +64,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
|
||||
[optionalParamDestory]
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}`
|
||||
|
@ -71,9 +71,6 @@ napi_value [middleClassName]createThreadSafeFunc[funcName]_middle(napi_env env,
|
||||
XNapiTool::CallThreadSafeFunc(vio->eventName);
|
||||
napi_value result = pxt->UndefinedValue();
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user