mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +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
|
@ -4,7 +4,7 @@
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
use constellation_traits::BroadcastMsg;
|
||||
use constellation_traits::BroadcastChannelMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
use uuid::Uuid;
|
||||
|
@ -89,7 +89,7 @@ impl BroadcastChannelMethods<crate::DomTypeHolder> for BroadcastChannel {
|
|||
|
||||
let global = self.global();
|
||||
|
||||
let msg = BroadcastMsg {
|
||||
let msg = BroadcastChannelMsg {
|
||||
origin: global.origin().immutable().clone(),
|
||||
channel_name: self.Name().to_string(),
|
||||
data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue