mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +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
fbf6c7fc2b
commit
a74ce64539
1 changed files with 3 additions and 1 deletions
|
@ -192,7 +192,9 @@ impl Node {
|
|||
debug_assert!(thread_state::get().is_script());
|
||||
let win = window_from_node(self);
|
||||
self.style_and_layout_data.set(None);
|
||||
win.layout_chan().send(Msg::ReapStyleAndLayoutData(data)).unwrap();
|
||||
if win.layout_chan().send(Msg::ReapStyleAndLayoutData(data)).is_err() {
|
||||
warn!("layout thread unreachable - leaking layout data");
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds a new child to the end of this node's list of children.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue