mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Port ScriptToConstellation channel to generic channel (#38990)
This change was previously part of
fb1c0a4c48
, which got reverted due to an
issue
with the compositor channel.
Split this change out into a separate PR, as it probably should have
been in the first place. Presumably it was one change before, since
serialization of crossbeam generic channels in single-process mode was
not implemented yet at the time.
Testing: Covered by existing tests. No custom callbacks involved.
Part of #38912
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
c4a69abe30
commit
20e955277a
4 changed files with 9 additions and 11 deletions
|
@ -290,7 +290,7 @@ pub struct Constellation<STF, SWF> {
|
|||
|
||||
/// An IPC channel for script threads to send messages to the constellation.
|
||||
/// This is the script threads' view of `script_receiver`.
|
||||
script_sender: IpcSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
script_sender: GenericSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
|
||||
/// A channel for the constellation to receive messages from script threads.
|
||||
/// This is the constellation's view of `script_sender`.
|
||||
|
@ -607,11 +607,8 @@ where
|
|||
.name("Constellation".to_owned())
|
||||
.spawn(move || {
|
||||
let (script_ipc_sender, script_ipc_receiver) =
|
||||
ipc::channel().expect("ipc channel failure");
|
||||
let script_receiver =
|
||||
route_ipc_receiver_to_new_crossbeam_receiver_preserving_errors(
|
||||
script_ipc_receiver,
|
||||
);
|
||||
generic_channel::channel().expect("ipc channel failure");
|
||||
let script_receiver = script_ipc_receiver.route_preserving_errors();
|
||||
|
||||
let (namespace_ipc_sender, namespace_ipc_receiver) =
|
||||
generic_channel::channel().expect("ipc channel failure");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue