1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2021-01-30 18:20:40 +01:00
parent 322936115e
commit f3e85e43c7
4 changed files with 80 additions and 35 deletions

View file

@ -35,7 +35,7 @@ namespace Web {
class OutOfProcessWebView;
class WebContentClient
class WebContentClient final
: public IPC::ServerConnection<WebContentClientEndpoint, WebContentServerEndpoint>
, public WebContentClientEndpoint {
C_OBJECT(WebContentClient);
@ -43,9 +43,13 @@ class WebContentClient
public:
virtual void handshake() override;
Function<void()> on_web_content_process_crash;
private:
WebContentClient(OutOfProcessWebView&);
virtual void die() override;
virtual void handle(const Messages::WebContentClient::DidPaint&) override;
virtual void handle(const Messages::WebContentClient::DidFinishLoading&) override;
virtual void handle(const Messages::WebContentClient::DidInvalidateContentRect&) override;