From: jaekuk lee Date: Mon, 17 Sep 2018 06:33:41 +0000 (+0000) Subject: Revert "Fixed crash issue occurred when terminating App using HOME Key" X-Git-Tag: submit/tizen/20180917.102309~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=694c67133f73409973a008246b44ed035a490ff1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Revert "Fixed crash issue occurred when terminating App using HOME Key" This reverts commit 99b64b8ae3f78a5a48b9c30d0da3a2d590f25f5b. Change-Id: I5f2a7d21035cf966353e80d5ab13c1afd1e5dca9 --- diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 2b8eb4a9d..9039ca724 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -775,7 +775,7 @@ void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) { vc_webview_->vc_webview_set_view(new_view->evas_object()); } -void WebApplication::RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called) { +void WebApplication::RemoveWebViewFromStack(WebView* view) { if (view_stack_.size() == 0) return; @@ -815,17 +815,13 @@ void WebApplication::RemoveWebViewFromStack(WebView* view, bool is_closed_webvie vc_webview_->vc_webview_set_view(view_stack_.front()->evas_object()); } - if (is_closed_webview_called) - delete view; - else { - // Delete after the callback context(for ewk view) was not used - ecore_idler_add([](void* view) { - WebView* obj = static_cast(view); - delete obj; - return EINA_FALSE; - }, - view); - } + // Delete after the callback context(for ewk view) was not used + ecore_idler_add([](void* view) { + WebView* obj = static_cast(view); + delete obj; + return EINA_FALSE; + }, + view); } Eina_Bool WebApplication::CheckPluginSession(void* user_data) @@ -846,7 +842,7 @@ Eina_Bool WebApplication::CheckPluginSession(void* user_data) void WebApplication::OnClosedWebView(WebView* view) { // Reply to javascript dialog for preventing freeze issue. view->ReplyToJavascriptDialog(); - RemoveWebViewFromStack(view, true); + RemoveWebViewFromStack(view); #if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << @@ -1015,7 +1011,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front(), false); + RemoveWebViewFromStack(view_stack_.front()); } } } @@ -1035,7 +1031,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front(), false); + RemoveWebViewFromStack(view_stack_.front()); } } diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index af4fce267..a724a0902 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -125,7 +125,7 @@ class WebApplication : public WebView::EventListener { void LaunchInspector(common::AppControl* appcontrol); void SetupWebView(WebView* view); void SetupWebViewCompatibilitySettings(WebView* view); - void RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called); + void RemoveWebViewFromStack(WebView* view); void SetupTizenVersion(); bool tizenWebKitCompatibilityEnabled() const;