mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +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());
|
||||
let win = window_from_node(node);
|
||||
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