1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibWeb: Serialize and pass to the WebWorker the current ESO

This allows the initial fetch() in the run a worker AO to use the proper
values from the outside settings.
This commit is contained in:
Andrew Kaster 2024-03-05 09:42:10 -07:00 committed by Andreas Kling
parent 4d22358e05
commit b5acc5f2df
12 changed files with 92 additions and 13 deletions

View file

@ -22,7 +22,7 @@ class WorkerAgent : public JS::Cell {
JS_CELL(Agent, JS::Cell);
JS_DECLARE_ALLOCATOR(WorkerAgent);
WorkerAgent(URL url, WorkerOptions const& options, JS::GCPtr<MessagePort> outside_port);
WorkerAgent(URL url, WorkerOptions const& options, JS::GCPtr<MessagePort> outside_port, JS::NonnullGCPtr<EnvironmentSettingsObject> outside_settings);
private:
virtual void initialize(JS::Realm&) override;
@ -33,6 +33,7 @@ private:
JS::GCPtr<MessagePort> m_message_port;
JS::GCPtr<MessagePort> m_outside_port;
JS::NonnullGCPtr<EnvironmentSettingsObject> m_outside_settings;
RefPtr<Web::HTML::WebWorkerClient> m_worker_ipc;
};