X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=runtime%2Fbrowser%2Fruntime_process.cc;h=83d7645f924866cf7b08819f8f8aa1d504971895;hb=ccb5936a271fc9502fb3ba8b82373fa92d99df80;hp=6a190f04bacdb0a5e9b336e0e843409f1474fc0b;hpb=f47add684cbfbb12dbd26eecb0c672f803c36b38;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index 6a190f0..83d7645 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -14,7 +14,8 @@ * limitations under the License. */ -#include +#include +#include #include @@ -27,11 +28,15 @@ #include "common/command_line.h" #include "common/logger.h" #include "common/profiler.h" +#include "extensions/renderer/xwalk_extension_renderer_controller.h" #include "runtime/browser/runtime.h" #include "runtime/common/constants.h" #include "runtime/browser/prelauncher.h" #include "runtime/browser/preload_manager.h" +#include "runtime/browser/ui_runtime.h" + +using namespace extensions; bool g_prelaunch = false; #ifdef WATCH_FACE_FEATURE_SUPPORT @@ -129,14 +134,26 @@ int real_main(int argc, char* argv[]) { std::unique_ptr runtime = runtime::Runtime::MakeRuntime(appdata); ret = runtime->Exec(argc, argv); + if (ret) + LOGGER(ERROR) << "Exec returns non zero."; + LOGGER(DEBUG) << "plugin_session_count : " << + XWalkExtensionRendererController::plugin_session_count; + if (XWalkExtensionRendererController::plugin_session_count > 0) { + LOGGER(DEBUG) << "Defer termination of main loop"; + ecore_main_loop_begin(); + } runtime.reset(); } + LOGGER(DEBUG) << "ewk_shutdown"; ewk_shutdown(); - exit(ret); + elm_shutdown(); + elm_exit(); + LOGGER(DEBUG) << "EXIT_SUCCESS"; return EXIT_SUCCESS; } +__attribute__((visibility("default"))) int main(int argc, char* argv[]) { if (strcmp(argv[0], "/usr/bin/wrt-loader") == 0) { elm_init(argc, argv);