mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
codecheck
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
665754a08f
@ -987,8 +987,14 @@ napi_value JsContinuationManagerInit(napi_env env, napi_value exportObj)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
JsContinuationManager* jsContinuationManager = new JsContinuationManager();
|
JsContinuationManager *jsContinuationManager = new JsContinuationManager();
|
||||||
napi_wrap(env, exportObj, jsContinuationManager, JsContinuationManager::Finalizer, nullptr, nullptr);
|
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";
|
const char *moduleName = "JsContinuationManager";
|
||||||
BindNativeFunction(env, exportObj, "register", moduleName, JsContinuationManager::Register);
|
BindNativeFunction(env, exportObj, "register", moduleName, JsContinuationManager::Register);
|
||||||
BindNativeFunction(env, exportObj, "unregister", moduleName, JsContinuationManager::Unregister);
|
BindNativeFunction(env, exportObj, "unregister", moduleName, JsContinuationManager::Unregister);
|
||||||
|
@ -904,7 +904,7 @@ int32_t DSchedContinue::PackDataCmd(std::shared_ptr<DSchedContinueDataCmd>& cmd,
|
|||||||
int32_t DSchedContinue::CheckStartPermission(std::shared_ptr<DSchedContinueDataCmd> cmd)
|
int32_t DSchedContinue::CheckStartPermission(std::shared_ptr<DSchedContinueDataCmd> cmd)
|
||||||
{
|
{
|
||||||
if (cmd->srcBundleName_ == cmd->dstBundleName_) {
|
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);
|
cmd->accountInfo_, START_PERMISSION, true);
|
||||||
} else {
|
} else {
|
||||||
if (!BundleManagerInternal::IsSameDeveloperId(cmd->dstBundleName_, cmd->srcDeveloperId_)) {
|
if (!BundleManagerInternal::IsSameDeveloperId(cmd->dstBundleName_, cmd->srcDeveloperId_)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user