summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebContentClient.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-30 18:20:40 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-30 18:27:39 +0100
commitf3e85e43c739741b15c1f421b04384431eb3167f (patch)
tree03288f0ffdbcbc8f0384f20d2e728b09401b8d02 /Userland/Libraries/LibWeb/WebContentClient.cpp
parent322936115e9c85e40310c86e8453160f82d511fb (diff)
downloadserenity-f3e85e43c739741b15c1f421b04384431eb3167f.zip
LibWeb: Handle WebContent process crashes gracefully :^)
The OOPWV will now detect WebContent process crashes/disconnections and simply create a new WebContent process in its place. We also generate a little error page with a link to the crashing URL so you can reload and try again. This a huge step forward for OOPWV since it now has a feature that IPWV can never replicate. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/WebContentClient.cpp')
-rw-r--r--Userland/Libraries/LibWeb/WebContentClient.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebContentClient.cpp b/Userland/Libraries/LibWeb/WebContentClient.cpp
index dd40e426be..087f9f9c9e 100644
--- a/Userland/Libraries/LibWeb/WebContentClient.cpp
+++ b/Userland/Libraries/LibWeb/WebContentClient.cpp
@@ -37,6 +37,12 @@ WebContentClient::WebContentClient(OutOfProcessWebView& view)
handshake();
}
+void WebContentClient::die()
+{
+ ASSERT(on_web_content_process_crash);
+ on_web_content_process_crash();
+}
+
void WebContentClient::handshake()
{
auto response = send_sync<Messages::WebContentServer::Greet>(getpid());