style: Make WorkQueue creation fallible.

Fixes bug 1290205 in bugzilla.
This commit is contained in:
Emilio Cobos Álvarez 2016-08-25 11:37:55 -07:00
parent 8a5e1b70b7
commit 4194ba063a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 43 additions and 15 deletions

View file

@ -399,7 +399,7 @@ impl LayoutThread {
MediaType::Screen,
opts::get().initial_window_size.to_f32() * ScaleFactor::new(1.0));
let parallel_traversal = if layout_threads != 1 {
Some(WorkQueue::new("LayoutWorker", thread_state::LAYOUT, layout_threads))
WorkQueue::new("LayoutWorker", thread_state::LAYOUT, layout_threads).ok()
} else {
None
};