From: Woongsuk Cho Date: Thu, 26 Mar 2020 03:40:20 +0000 (+0900) Subject: call ecore_init() in the CoreRuntime constructor. X-Git-Tag: accepted/tizen/unified/20200402.155646~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d31dd71a0a72bcf3d95bb635d6598d1b874a0752;p=platform%2Fcore%2Fdotnet%2Flauncher.git call ecore_init() in the CoreRuntime constructor. ecore_init() must called before CoreRuntime initialization. But, sometimes, calling ecore_init() is missed by mistake. In order to prevent this mistake, call ecore_init() in the constructor of CoreRuntime. --- diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 9e3a077..e6d3bc7 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -37,6 +37,8 @@ #include #include +#include + #include "injection.h" #include "utils.h" #include "log.h" @@ -283,6 +285,9 @@ CoreRuntime::CoreRuntime(const char* mode) : { _INFO("Constructor called!!"); + // Intiailize ecore first (signal handlers, etc.) before runtime init. + ecore_init(); + char *env = nullptr; env = getenv("CORECLR_ENABLE_PROFILING"); if (env != nullptr && !strcmp(env, "1")) { diff --git a/NativeLauncher/launcher/main.cc b/NativeLauncher/launcher/main.cc index 548b2e6..3645320 100644 --- a/NativeLauncher/launcher/main.cc +++ b/NativeLauncher/launcher/main.cc @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -74,9 +73,6 @@ extern "C" int realMain(int argc, char *argv[], const char* mode) std::unique_ptr runtime(new CoreRuntime(mode)); - // Intiailize ecore first (signal handlers, etc.) before runtime init. - ecore_init(); - if (corerunMode) { _INFO("##### Run in corerun mode #####"); char appId[APPID_MAX_LENGTH] = {0,};