LibWeb+LibWebView+Services: Add IPC for starting WebWorker of a type

The provides some of the plumbing for a WebContent process to spin
up a WebWorker that is not just a dedicated worker.
This commit is contained in:
Shannon Booth 2025-04-24 17:07:09 +12:00 committed by Andreas Kling
parent 041ff0c7ff
commit a2cca59516
Notes: github-actions[bot] 2025-04-25 14:45:22 +00:00
10 changed files with 49 additions and 13 deletions

View file

@ -34,7 +34,7 @@ void WorkerAgentParent::initialize(JS::Realm& realm)
// NOTE: This blocking IPC call may launch another process.
// If spinning the event loop for this can cause other javascript to execute, we're in trouble.
auto worker_socket_file = Bindings::principal_host_defined_page(realm).client().request_worker_agent();
auto worker_socket_file = Bindings::principal_host_defined_page(realm).client().request_worker_agent(Bindings::AgentType::DedicatedWorker);
auto worker_socket = MUST(Core::LocalSocket::adopt_fd(worker_socket_file.take_fd()));
MUST(worker_socket->set_blocking(true));