mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWebView: Create a spare WebContent process
Since cross-site navigation is a pretty frequent task, creating a spare process is commonplace in other browsers to reduce the overhead of directing the target site to a new process. We store this process on the WebView application. If it is unavailable, we queue a task to create it later.
This commit is contained in:
parent
5810c8073e
commit
aca4385daf
Notes:
github-actions[bot]
2025-03-11 11:11:42 +00:00
Author: https://github.com/trflynn89
Commit: aca4385daf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3882
Reviewed-by: https://github.com/gmta ✅
8 changed files with 98 additions and 9 deletions
|
@ -568,11 +568,8 @@ void ViewImplementation::initialize_client(CreateNewClient create_new_client)
|
|||
if (create_new_client == CreateNewClient::Yes) {
|
||||
m_client_state = {};
|
||||
|
||||
// FIXME: Fail to open the tab, rather than crashing the whole application if these fail.
|
||||
auto request_server_socket = connect_new_request_server_client().release_value_but_fixme_should_propagate_errors();
|
||||
auto image_decoder_socket = connect_new_image_decoder_client().release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_client_state.client = launch_web_content_process(*this, AK::move(image_decoder_socket), AK::move(request_server_socket)).release_value_but_fixme_should_propagate_errors();
|
||||
// FIXME: Fail to open the tab, rather than crashing the whole application if this fails.
|
||||
m_client_state.client = Application::the().launch_web_content_process(*this).release_value_but_fixme_should_propagate_errors();
|
||||
} else {
|
||||
m_client_state.client->register_view(m_client_state.page_index, *this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue