mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
@@ -4462,7 +4462,7 @@ int AppMgrServiceInner::StartRenderProcess(const pid_t hostPid, const std::strin
|
||||
int32_t childNumLimit = appRecord->GetIsGPU() ? PHONE_MAX_RENDER_PROCESS_NUM + 1 : PHONE_MAX_RENDER_PROCESS_NUM;
|
||||
// The phone device allows a maximum of 40 render processes to be created.
|
||||
if (AAFwk::AppUtils::GetInstance().IsLimitMaximumOfRenderProcess() &&
|
||||
renderRecordMap.size() >= childNumLimit) {
|
||||
renderRecordMap.size() >= static_cast<uint32_t>(childNumLimit)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Reaching the maximum render process limitation, hostPid:%{public}d", hostPid);
|
||||
return ERR_REACHING_MAXIMUM_RENDER_PROCESS_LIMITATION;
|
||||
}
|
||||
|
||||
@@ -172,11 +172,13 @@ int32_t AppSpawnClient::SetMountPermission(const AppSpawnStartMsg &startMsg, App
|
||||
}
|
||||
}
|
||||
|
||||
if (!startMsg.processType.empty() &&
|
||||
(ret = AppSpawnReqMsgAddExtInfo(reqHandle, MSG_EXT_NAME_PROCESS_TYPE,
|
||||
reinterpret_cast<const uint8_t*>(startMsg.processType.c_str()), startMsg.processType.size()))) {
|
||||
HILOG_ERROR("AppSpawnReqMsgAddExtInfo failed, ret: %{public}d", ret);
|
||||
return ret;
|
||||
if (!startMsg.processType.empty()) {
|
||||
ret = AppSpawnReqMsgAddExtInfo(reqHandle, MSG_EXT_NAME_PROCESS_TYPE,
|
||||
reinterpret_cast<const uint8_t*>(startMsg.processType.c_str()), startMsg.processType.size());
|
||||
if (ret) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgAddExtInfo failed, ret: %{public}d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -216,9 +218,11 @@ int32_t AppSpawnClient::SetAtomicServiceFlag(const AppSpawnStartMsg &startMsg, A
|
||||
int32_t AppSpawnClient::SetStrictMode(const AppSpawnStartMsg &startMsg, AppSpawnReqMsgHandle reqHandle)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
if (startMsg.strictMode &&
|
||||
(ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_ISOLATED_SANDBOX))) {
|
||||
HILOG_ERROR("AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
|
||||
if (startMsg.strictMode) {
|
||||
ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_ISOLATED_SANDBOX);
|
||||
if (ret) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -226,9 +230,11 @@ int32_t AppSpawnClient::SetStrictMode(const AppSpawnStartMsg &startMsg, AppSpawn
|
||||
int32_t AppSpawnClient::SetAppExtension(const AppSpawnStartMsg &startMsg, AppSpawnReqMsgHandle reqHandle)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
if (startMsg.isolatedExtension &&
|
||||
(ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_EXTENSION_SANDBOX))) {
|
||||
HILOG_ERROR("AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
|
||||
if (startMsg.isolatedExtension) {
|
||||
ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_EXTENSION_SANDBOX);
|
||||
if (ret) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user