Skip to content

Commit

Permalink
wpelauncher: automatic restart webprocess on crash
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alberto Lopez Perez <[email protected]>
  • Loading branch information
clopez committed Oct 16, 2017
1 parent 8b6705a commit e99b732
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 748f450a9a2ffc3b00550e2c818d2829ec73441c Mon Sep 17 00:00:00 2001
From: Carlos Alberto Lopez Perez <[email protected]>
Date: Mon, 16 Oct 2017 17:36:06 +0200
Subject: [PATCH] Automatic restart the WebProcess on crash

---
launcher/main.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/launcher/main.cpp b/launcher/main.cpp
index 74307ed..4a648f9 100644
--- a/launcher/main.cpp
+++ b/launcher/main.cpp
@@ -69,7 +69,11 @@ WKPageNavigationClientV0 s_navigationClient = {
nullptr, // renderingProgressDidChange
nullptr, // canAuthenticateAgainstProtectionSpace
nullptr, // didReceiveAuthenticationChallenge
- nullptr, // webProcessDidCrash
+ // webProcessDidCrash
+ [](WKPageRef page, const void*) {
+ fprintf(stderr, "WARNING: WebProcess crashed: restarting it ...\n");
+ WKPageReload(page);
+ },
nullptr, // copyWebCryptoMasterKey
nullptr, // didBeginNavigationGesture
nullptr, // willEndNavigationGesture
--
2.11.0

5 changes: 4 additions & 1 deletion recipes-browser/wpelauncher/wpelauncher_0.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ DEPENDS += "wpewebkit glib-2.0"

SRCREV = "734991a2f851899adbdb1be7df7a27ccfe20c7d4"

SRC_URI = "git://github.com/WebPlatformForEmbedded/WPEWebKitLauncher.git;protocol=http;branch=master"
SRC_URI = " \
git://github.com/WebPlatformForEmbedded/WPEWebKitLauncher.git;protocol=http;branch=master \
file://0001-Automatic-restart-the-WebProcess-on-crash.patch \
"

S = "${WORKDIR}/git"

Expand Down

0 comments on commit e99b732

Please sign in to comment.