LibWeb: Allow workers to be spawned by other workers

This commit provides IPC endpoint to WebWorker processes that allows new
WebWorker processes to be requested (just like what WebContent has).
This is implemented by proxying the request_worker_agent call from
WebWorker through WebContent to LibWebView. This allows the WPT test...
http://wpt.live/referrer-policy/gen/worker-classic.http-rp/unsafe-url/worker-classic.http.html
...to pass, and the same is likely true for similar tests.
This commit is contained in:
CountBleck
2026-01-06 13:33:34 -08:00
committed by Shannon Booth
parent ffdc333e95
commit 6a109c5c57
Notes: github-actions[bot] 2026-02-06 10:49:50 +00:00
7 changed files with 22 additions and 4 deletions

View File

@@ -104,10 +104,7 @@ void run_a_worker(Variant<GC::Ref<Worker>, GC::Ref<SharedWorker>> worker, URL::U
// 1. Let is shared be true if worker is a SharedWorker object, and false otherwise.
Bindings::AgentType agent_type = worker.has<GC::Ref<SharedWorker>>() ? Bindings::AgentType::SharedWorker : Bindings::AgentType::DedicatedWorker;
// 2. Let owner be the relevant owner to add given outside settings.
// FIXME: Support WorkerGlobalScope options
if (!is<HTML::WindowEnvironmentSettingsObject>(outside_settings))
TODO();
// FIXME: 2. Let owner be the relevant owner to add given outside settings.
// 3. Let unsafeWorkerCreationTime be the unsafe shared current time.