mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
This reverts commitfb1c0a4c48
. Previously in `create_compositor_channel`, the [routing callback][1] was setup so that a message received on the Compositor's IPC receiver will be forwarded to the local receiver using the `CompositorProxy` which also takes care of waking up the event loop. In #38782, this was changed so that the routing callbacks simply forwards the message directly without going via the `CompositorProxy`. This breaks behaviours that rely on the event loop being woken up on message sending, e.g. updating image frames for animated gifs. Since the GenericChannel API doesn't allow custom routing callbacks, revert this change until we figure out a better solution. [1]:d2ccce6052/components/servo/lib.rs (L1114)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
26fb603d15
commit
c75995ec87
9 changed files with 42 additions and 96 deletions
|
@ -8,7 +8,6 @@ use std::collections::HashMap;
|
|||
use std::fmt;
|
||||
|
||||
use base::Epoch;
|
||||
use base::generic_channel::{GenericSender, SendResult};
|
||||
use base::id::{
|
||||
BroadcastChannelRouterId, BrowsingContextId, HistoryStateId, MessagePortId,
|
||||
MessagePortRouterId, PipelineId, ServiceWorkerId, ServiceWorkerRegistrationId, WebViewId,
|
||||
|
@ -22,6 +21,7 @@ use embedder_traits::{
|
|||
};
|
||||
use euclid::default::Size2D as UntypedSize2D;
|
||||
use http::{HeaderMap, Method};
|
||||
use ipc_channel::Error as IpcError;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::policy_container::PolicyContainer;
|
||||
|
@ -46,14 +46,14 @@ use crate::{
|
|||
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct ScriptToConstellationChan {
|
||||
/// Sender for communicating with constellation thread.
|
||||
pub sender: GenericSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
pub sender: IpcSender<(PipelineId, ScriptToConstellationMessage)>,
|
||||
/// Used to identify the origin of the message.
|
||||
pub pipeline_id: PipelineId,
|
||||
}
|
||||
|
||||
impl ScriptToConstellationChan {
|
||||
/// Send ScriptMsg and attach the pipeline_id to the message.
|
||||
pub fn send(&self, msg: ScriptToConstellationMessage) -> SendResult {
|
||||
pub fn send(&self, msg: ScriptToConstellationMessage) -> Result<(), IpcError> {
|
||||
self.sender.send((self.pipeline_id, msg))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue