aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/compositor_task.rs
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2015-05-19 16:14:25 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2015-05-19 16:14:25 +1000
commit35a570ab66227fb640e64bd50373f1e1a9f51b22 (patch)
tree13dbe09505867725431267f7bd7ad0b033dec1c8 /components/compositing/compositor_task.rs
parent90aacf00f866c7ef3b858d84585bd5142f74c9ee (diff)
downloadservo-35a570ab66227fb640e64bd50373f1e1a9f51b22.tar.gz
servo-35a570ab66227fb640e64bd50373f1e1a9f51b22.zip
Fix several hangs / panics during pipeline cleanup of in progress loads.
This fixes a hang found while testing the jQuery test suite.
Diffstat (limited to 'components/compositing/compositor_task.rs')
-rw-r--r--components/compositing/compositor_task.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs
index 5a3c6bdd5fa..10a49fa3928 100644
--- a/components/compositing/compositor_task.rs
+++ b/components/compositing/compositor_task.rs
@@ -94,7 +94,13 @@ impl PaintListener for Box<CompositorProxy+'static+Send> {
fn get_graphics_metadata(&mut self) -> Option<NativeGraphicsMetadata> {
let (chan, port) = channel();
self.send(Msg::GetGraphicsMetadata(chan));
- port.recv().unwrap()
+ // If the compositor is shutting down when a paint task
+ // is being created, the compositor won't respond to
+ // this message, resulting in an eventual panic. Instead,
+ // just return None in this case, since the paint task
+ // will exit shortly and never actually be requested
+ // to paint buffers by the compositor.
+ port.recv().unwrap_or(None)
}
fn assign_painted_buffers(&mut self,