mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
compositor: Handle synchronous messages while shutting down (#31733)
During the shutdown process, various threads (such as the font cache thread) may be finishing up their work. If those threads make synchronous requests to the compositor, answer them -- even if the results will be unused. This is at least enough processing for them to finish their work and exit cleanly. This addresses crashes that are sometimes seen at exit, particuarly when the font cache thread tries to register a font during shutdown. In addition, this change also removes an unused compositor message.
This commit is contained in:
parent
2ec995a56f
commit
05d9373bc5
2 changed files with 96 additions and 51 deletions
|
@ -92,10 +92,6 @@ pub enum CompositorMsg {
|
|||
// sends a reply on the IpcSender, the constellation knows it's safe to
|
||||
// tear down the other threads associated with this pipeline.
|
||||
PipelineExited(PipelineId, IpcSender<()>),
|
||||
/// Runs a closure in the compositor thread.
|
||||
/// It's used to dispatch functions from webrender to the main thread's event loop.
|
||||
/// Required to allow WGL GLContext sharing in Windows.
|
||||
Dispatch(Box<dyn Fn() + Send>),
|
||||
/// Indicates to the compositor that it needs to record the time when the frame with
|
||||
/// the given ID (epoch) is painted and report it to the layout of the given
|
||||
/// pipeline ID.
|
||||
|
@ -164,7 +160,6 @@ impl Debug for CompositorMsg {
|
|||
CompositorMsg::PipelineVisibilityChanged(..) => write!(f, "PipelineVisibilityChanged"),
|
||||
CompositorMsg::PipelineExited(..) => write!(f, "PipelineExited"),
|
||||
CompositorMsg::NewWebRenderFrameReady(..) => write!(f, "NewWebRenderFrameReady"),
|
||||
CompositorMsg::Dispatch(..) => write!(f, "Dispatch"),
|
||||
CompositorMsg::PendingPaintMetric(..) => write!(f, "PendingPaintMetric"),
|
||||
CompositorMsg::LoadComplete(..) => write!(f, "LoadComplete"),
|
||||
CompositorMsg::WebDriverMouseButtonEvent(..) => write!(f, "WebDriverMouseButtonEvent"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue