mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +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
|
@ -327,14 +327,14 @@ impl BluetoothDeviceMethods<crate::DomTypeHolder> for BluetoothDevice {
|
|||
}
|
||||
|
||||
impl AsyncBluetoothListener for BluetoothDevice {
|
||||
fn handle_response(&self, response: BluetoothResponse, promise: &Rc<Promise>, _can_gc: CanGc) {
|
||||
fn handle_response(&self, response: BluetoothResponse, promise: &Rc<Promise>, can_gc: CanGc) {
|
||||
match response {
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-unwatchadvertisements
|
||||
BluetoothResponse::WatchAdvertisements(_result) => {
|
||||
// Step 3.1.
|
||||
self.watching_advertisements.set(true);
|
||||
// Step 3.2.
|
||||
promise.resolve_native(&());
|
||||
promise.resolve_native(&(), can_gc);
|
||||
},
|
||||
_ => promise.reject_error(Error::Type("Something went wrong...".to_owned())),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue