mirror of
https://gitee.com/openharmony/resourceschedule_background_task_mgr
synced 2024-11-23 06:50:07 +00:00
update interfaces/kits/napi/src/bg_continuous_task_napi_module.cpp.
Signed-off-by: 胡伟 <huwei169@huawei.com>
This commit is contained in:
parent
785a08ae27
commit
c956e52151
@ -559,6 +559,7 @@ napi_value UpdateBackgroundRunning(napi_env env, napi_callback_info info, bool i
|
||||
}
|
||||
|
||||
napi_value ret {nullptr};
|
||||
callbackPtr.release();
|
||||
ret = UpdateBackgroundRunningPromise(env, asyncCallbackInfo, isThrow);
|
||||
if (ret == nullptr) {
|
||||
BGTASK_LOGE("ret is nullpter");
|
||||
@ -568,7 +569,6 @@ napi_value UpdateBackgroundRunning(napi_env env, napi_callback_info info, bool i
|
||||
}
|
||||
ret = WrapVoidToJS(env);
|
||||
}
|
||||
callbackPtr.release();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ napi_value StartBackgroundRunning(napi_env env, napi_callback_info info, bool is
|
||||
} else {
|
||||
ret = StartBackgroundRunningPromise(env, asyncCallbackInfo, isThrow);
|
||||
}
|
||||
|
||||
callbackPtr.release();
|
||||
if (ret == nullptr) {
|
||||
BGTASK_LOGE("ret is nullpter");
|
||||
if (asyncCallbackInfo != nullptr) {
|
||||
@ -612,7 +612,6 @@ napi_value StartBackgroundRunning(napi_env env, napi_callback_info info, bool is
|
||||
}
|
||||
ret = WrapVoidToJS(env);
|
||||
}
|
||||
callbackPtr.release();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -755,7 +754,7 @@ napi_value StopBackgroundRunning(napi_env env, napi_callback_info info, bool isT
|
||||
} else {
|
||||
ret = StopBackgroundRunningPromise(env, asyncCallbackInfo, isThrow);
|
||||
}
|
||||
|
||||
callbackPtr.release();
|
||||
if (ret == nullptr) {
|
||||
BGTASK_LOGE("ret is nullpter");
|
||||
if (asyncCallbackInfo != nullptr) {
|
||||
@ -764,7 +763,6 @@ napi_value StopBackgroundRunning(napi_env env, napi_callback_info info, bool isT
|
||||
}
|
||||
ret = WrapVoidToJS(env);
|
||||
}
|
||||
callbackPtr.release();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user