mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
LibWeb+WebContent: Spawn Worker processes from the chrome
Instead of spawning these processes from the WebContent process, we now create them in the Browser chrome. Part 1/N of "all processes are owned by the chrome".
This commit is contained in:
parent
6ea4c248ab
commit
02edd240ae
Notes:
sideshowbarker
2024-07-17 02:42:21 +09:00
Author: https://github.com/ADKaster
Commit: 02edd240ae
Pull-request: https://github.com/SerenityOS/serenity/pull/22664
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/trflynn89 ✅
26 changed files with 152 additions and 99 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibGfx/Palette.h>
|
||||
#include <LibGfx/SystemTheme.h>
|
||||
#include <LibWeb/Crypto/Crypto.h>
|
||||
#include <LibWeb/Worker/WebWorkerClient.h>
|
||||
|
||||
REGISTER_WIDGET(WebView, OutOfProcessWebView)
|
||||
|
||||
|
@ -71,6 +72,11 @@ OutOfProcessWebView::OutOfProcessWebView()
|
|||
on_finish_handling_input_event = [this](auto event_was_accepted) {
|
||||
did_finish_handling_input_event(event_was_accepted);
|
||||
};
|
||||
|
||||
on_request_worker_agent = []() {
|
||||
auto worker_client = MUST(Web::HTML::WebWorkerClient::try_create());
|
||||
return worker_client->dup_sockets();
|
||||
};
|
||||
}
|
||||
|
||||
OutOfProcessWebView::~OutOfProcessWebView() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue