Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU: always send exit message to script before exiting #30989

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions components/webgpu/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -888,7 +885,7 @@ impl<'a> WGPU<'a> {
e
)
}
return;
break;
},
};
let adapter = WebGPUAdapter(adapter_id);
Expand Down Expand Up @@ -943,7 +940,7 @@ impl<'a> WGPU<'a> {
w
)
}
return;
break;
},
};
let device = WebGPUDevice(id);
Expand Down Expand Up @@ -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>(
Expand Down
Loading