!1345 appspawn耗时问题

Merge pull request !1345 from nianyuu/master
This commit is contained in:
openharmony_ci 2024-08-08 12:07:05 +00:00 committed by Gitee
commit 6ceae7180e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -931,15 +931,8 @@ static void AppSpawnRun(AppSpawnContent *content, int argc, char *const argv[])
APPSPAWN_STATIC int AppSpawnClearEnv(AppSpawnMgr *content, AppSpawningCtx *property)
{
APPSPAWN_CHECK(content != NULL, return 0, "Invalid appspawn content");
bool isNweb = IsNWebSpawnMode(content);
APPSPAWN_LOGV("Clear %{public}s context in child %{public}d process", !isNweb ? "appspawn" : "nwebspawn", getpid());
DeleteAppSpawningCtx(property);
AppSpawnDestroyContent(&content->content);
AppSpawnModuleMgrUnInstall(MODULE_DEFAULT);
AppSpawnModuleMgrUnInstall(isNweb ? MODULE_APPSPAWN : MODULE_NWEBSPAWN);
AppSpawnModuleMgrUnInstall(MODULE_COMMON);
APPSPAWN_LOGV("clear %{public}d end", getpid());
return 0;
}