script: add TaskSource argument to route_promise (#36831)

Added task_source argument to route_promise, enabling callers to pick
the correct TaskSource.

Testing: No testing required, straightforward refactor
Fixes: #36825

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-05-04 19:05:27 +02:00 committed by GitHub
parent 1e8896800a
commit 7e2d2ed0ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 46 additions and 15 deletions

View file

@ -117,7 +117,11 @@ impl GPUAdapterMethods<crate::DomTypeHolder> for GPUAdapter {
) -> Rc<Promise> {
// Step 2
let promise = Promise::new_in_current_realm(comp, can_gc);
let sender = route_promise(&promise, self);
let sender = route_promise(
&promise,
self,
self.global().task_manager().dom_manipulation_task_source(),
);
let mut required_features = wgpu_types::Features::empty();
for &ext in descriptor.requiredFeatures.iter() {
if let Some(feature) = gpu_to_wgt_feature(ext) {