Revert "Fixed crash issue occurred when terminating App using HOME Key" 38/189338/1
authorjaekuk lee <juku1999@samsung.com>
Mon, 17 Sep 2018 06:33:41 +0000 (06:33 +0000)
committerjaekuk lee <juku1999@samsung.com>
Mon, 17 Sep 2018 06:33:41 +0000 (06:33 +0000)
This reverts commit 99b64b8ae3f78a5a48b9c30d0da3a2d590f25f5b.

Change-Id: I5f2a7d21035cf966353e80d5ab13c1afd1e5dca9

runtime/browser/web_application.cc
runtime/browser/web_application.h

index 2b8eb4a9d66bfc609316280a87893def8aca1916..9039ca7244952404dde88395b6f80c515d5e0b75 100755 (executable)
@@ -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<WebView*>(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<WebView*>(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());
         }
       }
 
index af4fce26742887ff1c0db99cb97a8fba189bf26f..a724a09026f040e87ffe62204148eebbc2fadd85 100755 (executable)
@@ -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;