mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Make Promise::reject_error sound
This commit is contained in:
parent
15acd1525e
commit
af2e83f378
19 changed files with 110 additions and 94 deletions
|
@ -128,7 +128,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
}
|
||||
|
||||
impl AsyncBluetoothListener for BluetoothRemoteGATTService {
|
||||
fn handle_response(&self, response: BluetoothResponse, promise_cx: *mut JSContext, promise: &Rc<Promise>) {
|
||||
fn handle_response(&self, response: BluetoothResponse, _promise_cx: *mut JSContext, promise: &Rc<Promise>) {
|
||||
let device = self.Device();
|
||||
match response {
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren
|
||||
|
@ -158,7 +158,7 @@ impl AsyncBluetoothListener for BluetoothRemoteGATTService {
|
|||
}
|
||||
promise.resolve_native(&services);
|
||||
},
|
||||
_ => promise.reject_error(promise_cx, Error::Type("Something went wrong...".to_owned())),
|
||||
_ => promise.reject_error(Error::Type("Something went wrong...".to_owned())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue