diff options
Diffstat (limited to 'components/script/dom/bluetooth.rs')
-rw-r--r-- | components/script/dom/bluetooth.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs index dd5d05d4f2a..db32bcd4edf 100644 --- a/components/script/dom/bluetooth.rs +++ b/components/script/dom/bluetooth.rs @@ -106,14 +106,12 @@ impl Bluetooth { // Step 12-13. match device { Ok(device) => { - let global = self.global(); - let global = global.r(); - let global = global.as_global_scope(); - let ad_data = BluetoothAdvertisingData::new(global, + let global = self.global_scope(); + let ad_data = BluetoothAdvertisingData::new(&global, device.appearance, device.tx_power, device.rssi); - Ok(BluetoothDevice::new(global, + Ok(BluetoothDevice::new(&global, DOMString::from(device.id), device.name.map(DOMString::from), &ad_data)) |