From: Cho Woong Suk Date: Tue, 12 Jul 2016 12:49:38 +0000 (+0900) Subject: enable ewk_shutdown() to avoid crash issue, and call application destructor to remove... X-Git-Tag: accepted/tizen/common/20160907.154811~12^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ed22ba3db1892b3ca50e14360fef4438179c8c4;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git enable ewk_shutdown() to avoid crash issue, and call application destructor to removew webview Change-Id: I8e86d8c995fcca8ddd49f3246ed4efafcc294a8e --- diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index 0b0347f..6a190f0 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -116,8 +116,9 @@ int real_main(int argc, char* argv[]) { #ifdef WATCH_FACE_FEATURE_SUPPORT } else { if (appdata->app_type() == common::ApplicationData::WATCH) { - ecore_wl_shutdown(); - ecore_wl_init(NULL); + // Below code will be enabled after testing + //ecore_wl_shutdown(); + //ecore_wl_init(NULL); } #endif // WATCH_FACE_FEATURE_SUPPORT } @@ -130,10 +131,7 @@ int real_main(int argc, char* argv[]) { ret = runtime->Exec(argc, argv); runtime.reset(); } -#ifndef PROFILE_WEARABLE - LOGGER(DEBUG) << "ewk_shutdown() called"; ewk_shutdown(); -#endif exit(ret); return EXIT_SUCCESS; diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index 6784937..0d149cb 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -138,6 +138,8 @@ bool UiRuntime::OnCreate() { } void UiRuntime::OnTerminate() { + application_.reset(); + native_window_.reset(); } void UiRuntime::OnPause() { diff --git a/runtime/browser/watch_runtime.cc b/runtime/browser/watch_runtime.cc index 26294b5..7756abc 100644 --- a/runtime/browser/watch_runtime.cc +++ b/runtime/browser/watch_runtime.cc @@ -95,6 +95,14 @@ bool WatchRuntime::OnCreate() { } void WatchRuntime::OnTerminate() { + if (application_) { + delete application_; + application_ = nullptr; + } + if (native_window_) { + delete native_window_; + native_window_ = nullptr; + } } void WatchRuntime::OnPause() {