codecheck

Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
openharmony_ci 2024-11-08 11:33:52 +00:00 committed by MisterE
commit 665754a08f
2 changed files with 9 additions and 3 deletions

View File

@ -987,8 +987,14 @@ napi_value JsContinuationManagerInit(napi_env env, napi_value exportObj)
return nullptr;
}
JsContinuationManager* jsContinuationManager = new JsContinuationManager();
napi_wrap(env, exportObj, jsContinuationManager, JsContinuationManager::Finalizer, nullptr, nullptr);
JsContinuationManager *jsContinuationManager = new JsContinuationManager();
if (napi_wrap(env, exportObj, jsContinuationManager, JsContinuationManager::Finalizer, nullptr, nullptr)
!= napi_ok) {
JsContinuationManager::Finalizer(env, jsContinuationManager, nullptr);
jsContinuationManager = nullptr;
return nullptr;
}
const char *moduleName = "JsContinuationManager";
BindNativeFunction(env, exportObj, "register", moduleName, JsContinuationManager::Register);
BindNativeFunction(env, exportObj, "unregister", moduleName, JsContinuationManager::Unregister);

View File

@ -904,7 +904,7 @@ int32_t DSchedContinue::PackDataCmd(std::shared_ptr<DSchedContinueDataCmd>& cmd,
int32_t DSchedContinue::CheckStartPermission(std::shared_ptr<DSchedContinueDataCmd> cmd)
{
if (cmd->srcBundleName_ == cmd->dstBundleName_) {
return DistributedSchedService::GetInstance().CheckTargetPermission4DiffBundle(cmd->want_, cmd->callerInfo_,
return DistributedSchedService::GetInstance().CheckTargetPermission(cmd->want_, cmd->callerInfo_,
cmd->accountInfo_, START_PERMISSION, true);
} else {
if (!BundleManagerInternal::IsSameDeveloperId(cmd->dstBundleName_, cmd->srcDeveloperId_)) {