mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
refactor: add CanGc as argument to Promise::reject_error (#35646)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
c844ed232a
commit
38b71087bd
43 changed files with 323 additions and 249 deletions
|
@ -155,9 +155,9 @@ impl AsyncBluetoothListener for BluetoothRemoteGATTServer {
|
|||
// Step 5.2.3
|
||||
if self.Device().is_represented_device_null() {
|
||||
if let Err(e) = self.Device().garbage_collect_the_connection() {
|
||||
return promise.reject_error(e);
|
||||
return promise.reject_error(e, can_gc);
|
||||
}
|
||||
return promise.reject_error(Error::Network);
|
||||
return promise.reject_error(Error::Network, can_gc);
|
||||
}
|
||||
|
||||
// Step 5.2.4.
|
||||
|
@ -184,7 +184,7 @@ impl AsyncBluetoothListener for BluetoothRemoteGATTServer {
|
|||
}
|
||||
promise.resolve_native(&services, can_gc);
|
||||
},
|
||||
_ => promise.reject_error(Error::Type("Something went wrong...".to_owned())),
|
||||
_ => promise.reject_error(Error::Type("Something went wrong...".to_owned()), can_gc),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue