mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
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:
parent
4add737e88
commit
70ce8046c3
Notes:
github-actions[bot]
2024-11-12 14:27:00 +00:00
Author: https://github.com/trflynn89
Commit: 70ce8046c3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2300
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 42 additions and 12 deletions
|
@ -168,9 +168,12 @@ void HeadlessWebView::initialize_client(CreateNewClient create_new_client)
|
|||
client().async_connect_to_webdriver(m_client_state.page_index, *web_driver_ipc_path);
|
||||
|
||||
m_client_state.client->on_web_content_process_crash = [this] {
|
||||
warnln("\033[31;1mWebContent Crashed!!\033[0m");
|
||||
warnln(" Last page loaded: {}", url());
|
||||
VERIFY_NOT_REACHED();
|
||||
Core::deferred_invoke([this] {
|
||||
handle_web_content_process_crash(LoadErrorPage::No);
|
||||
|
||||
if (on_web_content_crashed)
|
||||
on_web_content_crashed();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue