mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Refactor constellation broadcast channel (#38077)
- Move the 2 hash maps used to manage channels in their own struct. - The constellation is still in charge of origin checks since it holds the pipeline information required. - BroadcastMsg is renamed to BroadcastChannelMsg for consistency. Testing: covered by existing tests. Fixes: #38060 Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
34829dfce7
commit
30b6e289e0
7 changed files with 199 additions and 198 deletions
|
@ -36,7 +36,7 @@ use strum_macros::IntoStaticStr;
|
|||
use webgpu_traits::{WebGPU, WebGPUAdapterResponse};
|
||||
use webrender_api::ImageKey;
|
||||
|
||||
use crate::structured_data::{BroadcastMsg, StructuredSerializedData};
|
||||
use crate::structured_data::{BroadcastChannelMsg, StructuredSerializedData};
|
||||
use crate::{
|
||||
LogEntry, MessagePortMsg, PortMessageTask, PortTransferInfo, TraversalDirection, WindowSizeType,
|
||||
};
|
||||
|
@ -506,7 +506,7 @@ pub enum ScriptToConstellationMessage {
|
|||
/// A global has started managing broadcast-channels.
|
||||
NewBroadcastChannelRouter(
|
||||
BroadcastChannelRouterId,
|
||||
IpcSender<BroadcastMsg>,
|
||||
IpcSender<BroadcastChannelMsg>,
|
||||
ImmutableOrigin,
|
||||
),
|
||||
/// A global has stopped managing broadcast-channels.
|
||||
|
@ -517,7 +517,7 @@ pub enum ScriptToConstellationMessage {
|
|||
RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin),
|
||||
/// Broadcast a message to all same-origin broadcast channels,
|
||||
/// excluding the source of the broadcast.
|
||||
ScheduleBroadcast(BroadcastChannelRouterId, BroadcastMsg),
|
||||
ScheduleBroadcast(BroadcastChannelRouterId, BroadcastChannelMsg),
|
||||
/// Forward a message to the embedder.
|
||||
ForwardToEmbedder(EmbedderMsg),
|
||||
/// Broadcast a storage event to every same-origin pipeline.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue