mirror of
https://github.com/servo/servo
synced 2026-05-08 16:12:15 +02:00
`UnprivilegedPipelineContent` contains all of the data necessary to create a new `ScriptThread` with an initial `Pipeline` in a new process. This change reuses the `InitialScriptState` and `InitialPipelineState` structs inside `UnprivilegedPipelineContent` and renames it to `NewScriptEventLoopProcessInfo` to clarify what it does. In addition, `InitialScriptState` also repeated much of the data of `NewPipelineInfo`, which is now deduplicated and passed separately to the `ScriptThreadFactory`. The overall goal here is to make `ScriptThread` and `Pipeline` creation separate. A `ScriptThread` contains many `Pipeline`s which come and go, so it should not depend on a single creation `Pipeline`. This is the first step toward doing that. Some inputs to `ScriptThreadFactory` differ based on whether the new `ScriptThread` is created in a new process or not. This change makes it so that these input are passed as extra arguments. Finally these changes have revealed a couple members of data structures that aren't used. These have been removed. Testing: This is just a refactor and shouldn't change behavior so is covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>