diff options
author | saturneric <[email protected]> | 2023-12-03 12:28:46 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-03 12:28:46 +0000 |
commit | 883db05d54510e76b6548e107593187e1306117d (patch) | |
tree | a4de9d60d3bfeb69ba443129d208feef65250b2c /src/core/module/GlobalModuleContext.cpp | |
parent | feat: improve memory security of function framework (diff) | |
download | GpgFrontend-883db05d54510e76b6548e107593187e1306117d.tar.gz GpgFrontend-883db05d54510e76b6548e107593187e1306117d.zip |
feat: general improvements of aync execution and memory security
Diffstat (limited to 'src/core/module/GlobalModuleContext.cpp')
-rw-r--r-- | src/core/module/GlobalModuleContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp index cb459f65..4195d719 100644 --- a/src/core/module/GlobalModuleContext.cpp +++ b/src/core/module/GlobalModuleContext.cpp @@ -119,7 +119,8 @@ class GlobalModuleContext::Impl { ModuleRegisterInfo register_info; register_info.module = module; register_info.channel = acquire_new_unique_channel(); - register_info.task_runner = std::make_shared<Thread::TaskRunner>(); + register_info.task_runner = + GpgFrontend::SecureCreateSharedObject<Thread::TaskRunner>(); register_info.task_runner->Start(); // move module to its task runner' thread @@ -128,7 +129,8 @@ class GlobalModuleContext::Impl { // Register the module with its identifier. module_register_table_[module->GetModuleIdentifier()] = - std::make_shared<ModuleRegisterInfo>(std::move(register_info)); + GpgFrontend::SecureCreateSharedObject<ModuleRegisterInfo>( + std::move(register_info)); SPDLOG_DEBUG("successfully registered module: {}", module->GetModuleIdentifier()); |