mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make bluetooth::result_to_promise take a &GlobalScope
This commit is contained in:
parent
9183525192
commit
d4fccbace4
5 changed files with 16 additions and 17 deletions
|
@ -138,7 +138,7 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
#[allow(unrooted_must_root)]
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connect
|
||||
fn Connect(&self) -> Rc<Promise> {
|
||||
result_to_promise(self.global().r(), self.connect())
|
||||
result_to_promise(&self.global_scope(), self.connect())
|
||||
}
|
||||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-disconnect
|
||||
|
@ -161,7 +161,7 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
#[allow(unrooted_must_root)]
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservice
|
||||
fn GetPrimaryService(&self, service: BluetoothServiceUUID) -> Rc<Promise> {
|
||||
result_to_promise(self.global().r(), self.get_primary_service(service))
|
||||
result_to_promise(&self.global_scope(), self.get_primary_service(service))
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
|
@ -169,6 +169,6 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
fn GetPrimaryServices(&self,
|
||||
service: Option<BluetoothServiceUUID>)
|
||||
-> Rc<Promise> {
|
||||
result_to_promise(self.global().r(), self.get_primary_services(service))
|
||||
result_to_promise(&self.global_scope(), self.get_primary_services(service))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue