diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-06-20 13:23:48 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-06-22 09:35:19 -0400 |
commit | a74ce64539e29cfef96d03e87490c9454b61f3e1 (patch) | |
tree | 0ac778912df5b779fa7ffc4f0b416706379b2603 /components/script/dom/node.rs | |
parent | fbf6c7fc2bcabc69c16e0006c0c37e27e505d64d (diff) | |
download | servo-a74ce64539e29cfef96d03e87490c9454b61f3e1.tar.gz servo-a74ce64539e29cfef96d03e87490c9454b61f3e1.zip |
Avoid an unnecessary panic when the script task deals with a GC after the layout thread is unreachable.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 53a3f355b9d..ec370dff293 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -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. |