aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas
diff options
context:
space:
mode:
authorTaym Haddadi <haddadi.taym@gmail.com>2024-08-06 12:01:33 +0200
committerGitHub <noreply@github.com>2024-08-06 10:01:33 +0000
commit3800922cde6f1c5698a931183de9dbcd3d5d7e4e (patch)
treeb4fb8286fa1ba668f14101896059d84c9d514e82 /components/canvas
parent28430bad0e7a4d4c11710d61fbaf1c598bffa87d (diff)
downloadservo-3800922cde6f1c5698a931183de9dbcd3d5d7e4e.tar.gz
servo-3800922cde6f1c5698a931183de9dbcd3d5d7e4e.zip
Fix panic in Webrender during shutdown (#32897)
* Fix panic in webrender during shutdown Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Pass webgl_threads_sender to WebGLThreads::exit Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * follow the naming convention and use sender instead of webgl_threads_sender Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Avoid deadlock when webgl_threads is None Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use tuple matching for webgl_threads and webgl_threads_receiver Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove unused _webgl_threads_sender Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Diffstat (limited to 'components/canvas')
-rw-r--r--components/canvas/webgl_thread.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index f0dd3da3705..1ab3ce95bb3 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -368,7 +368,10 @@ impl WebGLThread {
WebGLMsg::SwapBuffers(swap_ids, sender, sent_time) => {
self.handle_swap_buffers(swap_ids, sender, sent_time);
},
- WebGLMsg::Exit => {
+ WebGLMsg::Exit(sender) => {
+ if let Err(e) = sender.send(()) {
+ warn!("Failed to send response to WebGLMsg::Exit ({e})");
+ }
return true;
},
}