mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Disable use of rayon with --layout-threads 1
instead of panicking
This commit is contained in:
parent
aade603025
commit
c895e3d236
6 changed files with 56 additions and 36 deletions
|
@ -139,11 +139,14 @@ impl<'a> AbsolutelyPositionedFragment<'a> {
|
|||
size: padding_rect.size.clone(),
|
||||
style,
|
||||
};
|
||||
let map = |a: &AbsolutelyPositionedFragment| a.layout(layout_context, &containing_block);
|
||||
let children = if layout_context.use_rayon {
|
||||
absolute.par_iter().map(map).collect()
|
||||
} else {
|
||||
absolute.iter().map(map).collect()
|
||||
};
|
||||
fragments.push(Fragment::Anonymous(AnonymousFragment {
|
||||
children: absolute
|
||||
.par_iter()
|
||||
.map(|a| a.layout(layout_context, &containing_block))
|
||||
.collect(),
|
||||
children,
|
||||
rect: padding_rect,
|
||||
mode: style.writing_mode,
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue