mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
refactor: add CanGc as argument to Promise::resolve (#35616)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
adb831eefe
commit
0383ba9a5b
57 changed files with 330 additions and 294 deletions
|
@ -189,7 +189,7 @@ impl GPUAdapterMethods<crate::DomTypeHolder> for GPUAdapter {
|
|||
if !unmask_hints.is_empty() {
|
||||
todo!("unmaskHints on RequestAdapterInfo");
|
||||
}
|
||||
promise.resolve_native(&*self.info);
|
||||
promise.resolve_native(&*self.info, can_gc);
|
||||
// Step 5
|
||||
promise
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ impl AsyncWGPUListener for GPUAdapter {
|
|||
can_gc,
|
||||
);
|
||||
self.global().add_gpu_device(&device);
|
||||
promise.resolve_native(&device);
|
||||
promise.resolve_native(&device, can_gc);
|
||||
},
|
||||
WebGPUResponse::Device((_, _, Err(RequestDeviceError::UnsupportedFeature(f)))) => {
|
||||
promise.reject_error(Error::Type(
|
||||
|
@ -246,7 +246,7 @@ impl AsyncWGPUListener for GPUAdapter {
|
|||
can_gc,
|
||||
);
|
||||
device.lose(GPUDeviceLostReason::Unknown, e.to_string(), can_gc);
|
||||
promise.resolve_native(&device);
|
||||
promise.resolve_native(&device, can_gc);
|
||||
},
|
||||
WebGPUResponse::None => unreachable!("Failed to get a response for RequestDevice"),
|
||||
_ => unreachable!("GPUAdapter received wrong WebGPUResponse"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue