From 83b85b03093c220897f01f63238cc1430cdf1210 Mon Sep 17 00:00:00 2001 From: Ryuan Choi Date: Thu, 6 Sep 2012 15:30:12 +0900 Subject: [PATCH] Terminate process when didProcessCrash is not controlled. [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 | 8 ++++++-- Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp | 2 +- Source/WebKit2/UIProcess/API/efl/ewk_view_private.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index 7697b6e..1fde228 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -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) diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp index aae0af8..47f50e4 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp @@ -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(const_cast(clientInfo)); - ewkViewProcessCrashed(ewkView); + ewk_view_process_crashed(ewkView); } void ewkViewLoaderClientAttachClient(Evas_Object* ewkView) diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h index 9c21e10..4ef919c 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h @@ -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); -- 2.7.4