diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2024-06-05 16:52:01 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2024-06-05 16:52:01 +0900 |
commit | f76a164f8493ce43acbaae6f96e660541c383d7e (patch) | |
tree | 7328b60da8148abc4f07bbeab629febdd5c528d2 /src | |
parent | 9a4b3ef25a981fba64f20c41744ebf5f7b780cfd (diff) | |
download | launchpad-f76a164f8493ce43acbaae6f96e660541c383d7e.tar.gz launchpad-f76a164f8493ce43acbaae6f96e660541c383d7e.tar.bz2 launchpad-f76a164f8493ce43acbaae6f96e660541c383d7e.zip |
Fix build error for gcc-14accepted/tizen/unified/x/asan/20240625.092457accepted/tizen/unified/x/20240610.223224accepted/tizen/unified/toolchain/20240610.172637accepted/tizen/unified/dev/20240620.005106accepted/tizen/unified/20240611.123058accepted/tizen_unified_x_asanaccepted/tizen_unified_toolchain
Change-Id: I93629f9daabf6cde9c5cdf9b1d8730baf4e3f5af
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/launchpad-process-pool/app_executor.cc | 25 | ||||
-rw-r--r-- | src/launchpad-process-pool/app_executor.hh | 1 | ||||
-rw-r--r-- | src/launchpad-process-pool/launchpad.cc | 3 |
3 files changed, 15 insertions, 14 deletions
diff --git a/src/launchpad-process-pool/app_executor.cc b/src/launchpad-process-pool/app_executor.cc index 3c7d325..b455bd6 100644 --- a/src/launchpad-process-pool/app_executor.cc +++ b/src/launchpad-process-pool/app_executor.cc @@ -291,22 +291,23 @@ void AppExecutor::CheckAndPrepareDebugging() { debug.CheckWebAppDebugging(b); } +LauncherInfoPtr AppExecutor::FindLauncherInfo(const std::string& app_type) { + for (auto& info : launcher_infos_) { + for (auto& type : info->GetAppTypes()) { + if (type == app_type) + return info; + } + } + + return nullptr; +} + std::vector<std::string> AppExecutor::GetLauncherArgv( const std::string& app_type) { std::vector<std::string> argv; - auto found = std::find_if( - launcher_infos_.begin(), launcher_infos_.end(), - [app_type](const launchpad::LauncherInfoPtr& info) -> bool { - return std::find_if(info->GetAppTypes().begin(), - info->GetAppTypes().end(), - [app_type](const std::string& type) -> bool { - return type == app_type; - }) != info->GetAppTypes().end(); - }); - if (found == launcher_infos_.end()) - return argv; + auto launcher_info = FindLauncherInfo(app_type); + if (launcher_info == nullptr) return argv; - auto launcher_info = *found; argv.insert(argv.end(), launcher_info->GetExe()); argv.insert(argv.end(), launcher_info->GetExtraArgs().begin(), launcher_info->GetExtraArgs().end()); diff --git a/src/launchpad-process-pool/app_executor.hh b/src/launchpad-process-pool/app_executor.hh index 7fd168e..4d75f9b 100644 --- a/src/launchpad-process-pool/app_executor.hh +++ b/src/launchpad-process-pool/app_executor.hh @@ -65,6 +65,7 @@ class AppExecutor : public Executor::Delegator, std::vector<std::string> GetLauncherArgv(const std::string& app_type); std::vector<std::string> CreateAppArgv(const std::string& app_path, const tizen_base::Bundle& b, const std::string& app_type); + LauncherInfoPtr FindLauncherInfo(const std::string& app_type); private: using PrepareFunc = std::function<int()>; diff --git a/src/launchpad-process-pool/launchpad.cc b/src/launchpad-process-pool/launchpad.cc index 8b82267..e91c60d 100644 --- a/src/launchpad-process-pool/launchpad.cc +++ b/src/launchpad-process-pool/launchpad.cc @@ -500,8 +500,7 @@ Launchpad::LaunchResult Launchpad::ForkProcessing( request->SendResult(request->GetPid()); _W("appid: %s, pid: %d", request->GetAppInfo()->GetAppId().c_str(), request->GetPid()); - LoaderManager::GetInst().HandleDirectLaunch( - std::move(request->GetLoaderContext())); + LoaderManager::GetInst().HandleDirectLaunch(request->GetLoaderContext()); if (request->GetPid() == -1) return LaunchResult::Fail; |