mirror of
https://github.com/servo/servo.git
synced 2025-06-11 10:00:18 +00:00
Avoid an unnecessary panic when the script task deals with a GC after the layout thread is unreachable.
This commit is contained in:
parent
a7701c9abd
commit
30d8009659
1 changed files with 3 additions and 1 deletions
|
@ -202,7 +202,9 @@ impl OpaqueStyleAndLayoutData {
|
||||||
debug_assert!(thread_state::get().is_script());
|
debug_assert!(thread_state::get().is_script());
|
||||||
let win = window_from_node(node);
|
let win = window_from_node(node);
|
||||||
node.style_and_layout_data.set(None);
|
node.style_and_layout_data.set(None);
|
||||||
win.layout_chan().send(Msg::ReapStyleAndLayoutData(self)).unwrap();
|
if win.layout_chan().send(Msg::ReapStyleAndLayoutData(self)).is_err() {
|
||||||
|
warn!("layout thread unreachable - leaking layout data");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue