Some plugins can execute some operations using the destructor of
the object used in the plugin after the installation is completed
so keep the StepRunParserPlugin object as a member variable in
StepRecoverParserPlugin
Change-Id: Iec91be1cea07e1ddada4a99a9791051a6ddbb073
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
LOG(ERROR) << "Failed to set xml path for plugin, but continue";
return Status::OK;
}
- StepRunParserPlugin plugin(context_, GetActionType(context_));
- if (plugin.process() != Step::Status::OK) {
+ plugin_ =
+ std::make_unique<StepRunParserPlugin>(context_, GetActionType(context_));
+ if (plugin_->process() != Step::Status::OK) {
LOG(ERROR) << "Failed to execute plugin properly, but continue";
return Status::OK;
}
#include <manifest_parser/utils/logging.h>
+#include <memory>
+
#include "common/installer_context.h"
+#include "common/step/pkgmgr/step_run_parser_plugins.h"
#include "common/step/recovery/step_recovery.h"
namespace common_installer {
Status RecoverPlugin();
bool SetXmlPath();
+ std::unique_ptr<StepRunParserPlugin> plugin_;
+
STEP_NAME(RecoverParserPlugin)
};