mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix returned error types in WebGPU
This commit is contained in:
parent
a751b1c3d7
commit
430248e9c8
3 changed files with 7 additions and 16 deletions
|
@ -102,12 +102,10 @@ impl GPUAdapterMethods for GPUAdapter {
|
|||
.send(WebGPURequest::RequestDevice(sender, self.adapter, desc, id))
|
||||
.is_err()
|
||||
{
|
||||
promise.reject_error(Error::Type(
|
||||
"Failed to send RequestDevice message...".to_owned(),
|
||||
));
|
||||
promise.reject_error(Error::Operation);
|
||||
}
|
||||
} else {
|
||||
promise.reject_error(Error::Type("No WebGPU thread...".to_owned()))
|
||||
promise.reject_error(Error::Operation);
|
||||
};
|
||||
promise
|
||||
}
|
||||
|
@ -127,9 +125,7 @@ impl AsyncWGPUListener for GPUAdapter {
|
|||
);
|
||||
promise.resolve_native(&device);
|
||||
},
|
||||
_ => promise.reject_error(Error::Type(
|
||||
"Wrong response type from WebGPU thread...".to_owned(),
|
||||
)),
|
||||
_ => promise.reject_error(Error::Operation),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue