From bcd9ce0e7f2a937c5fd8aadb3f37ce407dc89e04 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 2 May 2023 00:13:10 +0000 Subject: [PATCH] Fix bug about handling app labels changes event Before disposing and preparaing the loader context, the launchpad has to dispose the candidate process of the process pool. Change-Id: Id80371087d2172399482d0350226e23c7b323e55 Signed-off-by: Hwankyu Jhun --- src/launchpad-process-pool/loader_manager.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/launchpad-process-pool/loader_manager.cc b/src/launchpad-process-pool/loader_manager.cc index 46620ef..549b7ab 100644 --- a/src/launchpad-process-pool/loader_manager.cc +++ b/src/launchpad-process-pool/loader_manager.cc @@ -446,6 +446,8 @@ LoaderManager::~LoaderManager() { } void LoaderManager::OnAppLabelsChanged() { + _W("BEGIN"); + LoaderExecutor::GetInst().DisposeCandidateProcess(); for (auto& context : loader_contexts_) { if (context->IsHydraMode()) { auto* hydra_context = dynamic_cast(context.get()); @@ -458,8 +460,7 @@ void LoaderManager::OnAppLabelsChanged() { context->Prepare(); } } - - LoaderExecutor::GetInst().DisposeCandidateProcess(); + _W("END"); } void LoaderManager::OnMemoryStatusChanged(bool low_memory, -- 2.7.4