mirror of
https://github.com/RGBCube/serenity
synced 2025-07-14 23:17:35 +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
26 changed files with 152 additions and 99 deletions
|
@ -44,6 +44,7 @@
|
|||
#include <LibWeb/Cookie/Cookie.h>
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/HTML/ActivateTab.h>
|
||||
#include <LibWeb/Worker/WebWorkerClient.h>
|
||||
#include <LibWebView/CookieJar.h>
|
||||
#include <LibWebView/Database.h>
|
||||
#include <LibWebView/URL.h>
|
||||
|
@ -169,6 +170,15 @@ private:
|
|||
on_set_cookie = [this](auto const& url, auto const& cookie, auto source) {
|
||||
m_cookie_jar.set_cookie(url, cookie, source);
|
||||
};
|
||||
|
||||
on_request_worker_agent = []() {
|
||||
#if defined(AK_OS_SERENITY)
|
||||
auto worker_client = MUST(Web::HTML::WebWorkerClient::try_create());
|
||||
#else
|
||||
auto worker_client = MUST(launch_web_worker_process(MUST(get_paths_for_helper_process("WebWorker"sv))));
|
||||
#endif
|
||||
return worker_client->dup_sockets();
|
||||
};
|
||||
}
|
||||
|
||||
void update_zoom() override { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue