headless-browser: Handle WebContent crashes similar to the graphical UIs

Instead of bringing the whole browser down, let's re-initialize the
WebContent client so we can move on. This is particularly needed for
WPT.
This commit is contained in:
Timothy Flynn 2024-11-12 08:50:54 -05:00 committed by Tim Ledbetter
commit 70ce8046c3
Notes: github-actions[bot] 2024-11-12 14:27:00 +00:00
4 changed files with 42 additions and 12 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/Badge.h>
#include <AK/Function.h>
#include <AK/RefPtr.h>
#include <LibCore/Forward.h>
#include <LibCore/Promise.h>
@ -31,6 +32,8 @@ public:
TestPromise& test_promise() { return *m_test_promise; }
void on_test_complete(TestCompletion);
Function<void()> on_web_content_crashed;
private:
HeadlessWebView(Core::AnonymousBuffer theme, Gfx::IntSize viewport_size);