aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgpu/gpu.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-01-07 04:36:39 +0100
committerGitHub <noreply@github.com>2025-01-07 03:36:39 +0000
commitfe8a22b72c42296ccbbd5c4f459936ea28c5dee2 (patch)
tree9749d88dc818a054c204ebbc5dc82878ced68c8d /components/script/dom/webgpu/gpu.rs
parentd252a631d292afc492b337c8b32a34b86139f99d (diff)
downloadservo-fe8a22b72c42296ccbbd5c4f459936ea28c5dee2.tar.gz
servo-fe8a22b72c42296ccbbd5c4f459936ea28c5dee2.zip
script: Unsilence all main thread `TaskQueue` errors (#34849)
No longer hide errors while queueing tasks on the main thread. This requires creating two types of `TaskSource`s: one for the main thread and one that can be sent to other threads. This makes queueing a bit more efficient on the main thread and more importantly, no longer hides task queue errors. Fixes #25688. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/script/dom/webgpu/gpu.rs')
-rw-r--r--components/script/dom/webgpu/gpu.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/webgpu/gpu.rs b/components/script/dom/webgpu/gpu.rs
index 8b1a2dd46a8..dd760229d58 100644
--- a/components/script/dom/webgpu/gpu.rs
+++ b/components/script/dom/webgpu/gpu.rs
@@ -71,7 +71,8 @@ pub fn response_async<T: AsyncWGPUListener + DomObject + 'static>(
let task_source = receiver
.global()
.task_manager()
- .dom_manipulation_task_source();
+ .dom_manipulation_task_source()
+ .to_sendable();
let mut trusted: Option<TrustedPromise> = Some(TrustedPromise::new(promise.clone()));
let trusted_receiver = Trusted::new(receiver);
ROUTER.add_typed_route(
@@ -88,12 +89,9 @@ pub fn response_async<T: AsyncWGPUListener + DomObject + 'static>(
trusted,
receiver: trusted_receiver.clone(),
};
- let result = task_source.queue(task!(process_webgpu_task: move|| {
+ task_source.queue(task!(process_webgpu_task: move|| {
context.response(message.unwrap(), CanGc::note());
}));
- if let Err(err) = result {
- error!("Failed to queue GPU listener-task: {:?}", err);
- }
}),
);
action_sender