Terminate process when didProcessCrash is not controlled.
authorRyuan Choi <ryuan.choi@samsung.com>
Thu, 6 Sep 2012 06:30:12 +0000 (15:30 +0900)
committerRyuan Choi <ryuan.choi@samsung.com>
Fri, 7 Sep 2012 03:08:04 +0000 (12:08 +0900)
[Title] Terminate process when didProcessCrash is not controlled.
[Issue#] S1-8073
[Problem] facebook screen NG and can't find anything but 'back' button.
[Cause] WebProcess is crashed but app does not handle crash event.
[Solution] As a default, exit when "process,crashed" is not handled.

Change-Id: I872079c029946b4da148d1704b3adc8506f9d369

Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view_private.h

index 7697b6e..1fde228 100755 (executable)
@@ -1967,9 +1967,13 @@ void ewkViewLoadProgressChanged(Evas_Object* ewkView, double progress)
     evas_object_smart_callback_call(ewkView, "load,progress", &progress);
 }
 
-void ewkViewProcessCrashed(Evas_Object* ewkView)
+void ewk_view_process_crashed(Evas_Object* ewkView)
 {
-    evas_object_smart_callback_call(ewkView, "process,crashed", 0);
+    bool handled = false;
+    evas_object_smart_callback_call(ewkView, "process,crashed", &handled);
+
+    if (!handled)
+        exit(0);
 }
 
 #if ENABLE(TIZEN_SQL_DATABASE)
index aae0af8..47f50e4 100755 (executable)
@@ -138,7 +138,7 @@ static void didChangeProgress(WKPageRef page, const void* clientInfo)
 static void processDidCrash(WKPageRef page, const void* clientInfo)
 {
     Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
-    ewkViewProcessCrashed(ewkView);
+    ewk_view_process_crashed(ewkView);
 }
 
 void ewkViewLoaderClientAttachClient(Evas_Object* ewkView)
index 9c21e10..4ef919c 100755 (executable)
@@ -169,7 +169,7 @@ void ewkViewSetTitle(Evas_Object* ewkView, const char* title);
 void ewkViewDidFirstVisuallyNonEmptyLayout(Evas_Object* ewkView);
 void ewkViewDidReceiveAuthenticationChallenge(Evas_Object* ewkView, Ewk_Auth_Challenge* authChallenge);
 void ewkViewLoadProgressChanged(Evas_Object* ewkView, double progress);
-void ewkViewProcessCrashed(Evas_Object* ewkView);
+void ewk_view_process_crashed(Evas_Object* ewkView);
 void ewkViewCustomizeContextMenu(Evas_Object* ewkView, Ewk_Context_Menu* menu);
 void ewkViewCustomContextMenuItemSelected(Evas_Object* ewkView, Ewk_Context_Menu_Item* item);
 uint64_t ewkContextGetDatabaseQuota(Ewk_Context* ewkContext);