aboutsummaryrefslogtreecommitdiffstats
path: root/components/webgpu/lib.rs
diff options
context:
space:
mode:
authorGregory Terzian <2792687+gterzian@users.noreply.github.com>2024-01-04 01:19:50 +0800
committerGitHub <noreply@github.com>2024-01-03 17:19:50 +0000
commitf44ff83c20b82d1f3272d9389563e30f0d3c9700 (patch)
tree252ea6e6f5dc40b646a5918c6c7cc330feed5b2a /components/webgpu/lib.rs
parent65cbc95d38819e9b3d5870953015a9e7963a0ace (diff)
downloadservo-f44ff83c20b82d1f3272d9389563e30f0d3c9700.tar.gz
servo-f44ff83c20b82d1f3272d9389563e30f0d3c9700.zip
WebGPU: always send exit message to script before exiting (#30989)
* webgpu: always send exit message to script before exiting * Update expectations --------- Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/webgpu/lib.rs')
-rw-r--r--components/webgpu/lib.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/webgpu/lib.rs b/components/webgpu/lib.rs
index e0db83ddbdc..77f21dd0c52 100644
--- a/components/webgpu/lib.rs
+++ b/components/webgpu/lib.rs
@@ -831,13 +831,10 @@ impl<'a> WGPU<'a> {
gfx_select!(texture => global.texture_drop(texture, true));
},
WebGPURequest::Exit(sender) => {
- if let Err(e) = self.script_sender.send(WebGPUMsg::Exit) {
- warn!("Failed to send WebGPUMsg::Exit to script ({})", e);
- }
if let Err(e) = sender.send(()) {
warn!("Failed to send response to WebGPURequest::Exit ({})", e)
}
- return;
+ break;
},
WebGPURequest::FreeCommandBuffer(command_buffer_id) => {
self.error_command_encoders
@@ -888,7 +885,7 @@ impl<'a> WGPU<'a> {
e
)
}
- return;
+ break;
},
};
let adapter = WebGPUAdapter(adapter_id);
@@ -943,7 +940,7 @@ impl<'a> WGPU<'a> {
w
)
}
- return;
+ break;
},
};
let device = WebGPUDevice(id);
@@ -1249,6 +1246,9 @@ impl<'a> WGPU<'a> {
}
}
}
+ if let Err(e) = self.script_sender.send(WebGPUMsg::Exit) {
+ warn!("Failed to send WebGPUMsg::Exit to script ({})", e);
+ }
}
fn send_result<U, T: std::fmt::Debug>(