aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/paint_thread.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-24 12:43:21 -0700
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-27 11:14:44 -0700
commit354dc660292b798bb0beafcc39a98e2519518e53 (patch)
tree99d634bede6421008a385a511209f97ebf19cd64 /components/gfx/paint_thread.rs
parent702445a3ec4d406472a618750f5dab64c38459bb (diff)
downloadservo-354dc660292b798bb0beafcc39a98e2519518e53.tar.gz
servo-354dc660292b798bb0beafcc39a98e2519518e53.zip
Some debugging improvements and code style nits across gfx and constellation.
* Propagate the RUST_LOG env var to the child process * Add debug information when a recv() fails in paint thread's select!.
Diffstat (limited to 'components/gfx/paint_thread.rs')
-rw-r--r--components/gfx/paint_thread.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs
index b4ad2abd299..6fad77dbcf3 100644
--- a/components/gfx/paint_thread.rs
+++ b/components/gfx/paint_thread.rs
@@ -379,8 +379,7 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
font_cache_thread: FontCacheThread,
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: mem::ProfilerChan) {
- thread::spawn_named(format!("PaintThread {:?}", id),
- move || {
+ thread::spawn_named(format!("PaintThread {:?}", id), move || {
thread_state::initialize(thread_state::PAINT);
PipelineId::install(id);
@@ -425,9 +424,9 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
let chrome_to_paint = &self.chrome_to_paint_port;
select! {
msg = layout_to_paint.recv() =>
- Msg::FromLayout(msg.unwrap()),
+ Msg::FromLayout(msg.expect("expected message from layout")),
msg = chrome_to_paint.recv() =>
- Msg::FromChrome(msg.unwrap())
+ Msg::FromChrome(msg.expect("expected message from chrome"))
}
};