aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_paint_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/canvas/webgl_paint_thread.rs')
-rw-r--r--components/canvas/webgl_paint_thread.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/components/canvas/webgl_paint_thread.rs b/components/canvas/webgl_paint_thread.rs
index 7e353dc3c4b..084ce49d491 100644
--- a/components/canvas/webgl_paint_thread.rs
+++ b/components/canvas/webgl_paint_thread.rs
@@ -228,15 +228,11 @@ impl WebGLPaintThread {
}
});
- match result_port.recv() {
- Ok(_) => {
- let (out_of_process_chan, out_of_process_port) = ipc::channel::<CanvasMsg>().unwrap();
- ROUTER.route_ipc_receiver_to_mpsc_sender(out_of_process_port, in_process_chan.clone());
-
- Ok((out_of_process_chan, in_process_chan))
- },
- Err(_) => Err("Could not create WebGLPaintThread.")
- }
+ result_port.recv().unwrap().map(|_| {
+ let (out_of_process_chan, out_of_process_port) = ipc::channel::<CanvasMsg>().unwrap();
+ ROUTER.route_ipc_receiver_to_mpsc_sender(out_of_process_port, in_process_chan.clone());
+ (out_of_process_chan, in_process_chan)
+ })
}
#[inline]