Apply the suspend before closing webview 99/107199/1
authorYoungcheol Kang <ychul.kang@samsung.com>
Tue, 27 Dec 2016 06:15:41 +0000 (15:15 +0900)
committerYoungcheol Kang <ychul.kang@samsung.com>
Tue, 27 Dec 2016 06:15:41 +0000 (15:15 +0900)
In order to prevent crash/freeze issue, the webview should be
suspended before closing.

Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2711

Change-Id: I0e69d0ccc12c41eae58b5989aeca317babcee780
Signed-off-by: Youngcheol Kang <ychul.kang@samsung.com>
runtime/browser/web_application.cc

index 49c4478..27195f3 100755 (executable)
@@ -180,6 +180,7 @@ static Eina_Bool ExitAppIdlerCallback(void* data) {
 
     for (; it != vstack.end(); ++it) {
       vstack.front()->SetVisibility(false);
+      (*it)->Suspend();
       ewk_view_page_close((*it)->evas_object());
     }
   }
@@ -278,6 +279,7 @@ WebApplication::~WebApplication() {
   window_->SetContent(NULL);
   auto it = view_stack_.begin();
   for (; it != view_stack_.end(); ++it) {
+    (*it)->Suspend();
     delete *it;
   }
   view_stack_.clear();
@@ -641,6 +643,7 @@ void WebApplication::RemoveWebViewFromStack(WebView* view) {
       view->SetEventListener(NULL);
       Terminate();
     } else {
+      view->Suspend();
       ewk_view_page_close(view->evas_object());
       return;
     }