Files
servo/components/script/dom/testing
Martin Robinson b334c9470b constellation: Reuse InitialScriptState and InitialPipelineState in UnprivilegedPipelineContent (#40529)
`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>
2025-11-10 11:41:59 +00:00
..