Add support for "webprocess,crashed" EWK callback
authorPiotr Tworek <p.tworek@samsung.com>
Fri, 6 Feb 2015 12:30:18 +0000 (13:30 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
It seems a little bit of code was lost while migrating some patches from
M34 to M40. According to EWK WebKit2 implementation the engine should
invoke "webprocess,crashed" callback whenever the webprocess crashes.
In case the callback is not handled by the EWK API user the engine should
show a simple page informing the user about the problematic situation.
Reviewed by: Janusz Majnert, Kamil Klimek, arno renevier

Change-Id: I39b9a7e4ee16606503f06b95c226dd4559b27b2a
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
tizen_src/impl/eweb_view.cc

index 82512f3..90a0fae 100644 (file)
@@ -2167,6 +2167,12 @@ bool EWebView::StopInspectorServer() {
 
 void EWebView::HandleRendererProcessCrash() {
   InitializeContent();
+
+  const char* last_url = GetURL();
+  bool callback_handled = false;
+  SmartCallback<EWebViewCallbacks::WebProcessCrashed>().call(&callback_handled);
+  if (!callback_handled)
+    LoadHTMLString(kRendererCrashedHTMLMessage, NULL, last_url);
 }
 
 void EWebView::InitializeContent() {