aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetoothremotegattservice.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-01 18:15:15 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:38 +0200
commitae6af5172b5f09e9ba19d0beca026fd0ac39f8c8 (patch)
treed60b33499b7caf460b78d53131bb0f147b6e5be0 /components/script/dom/bluetoothremotegattservice.rs
parent27f100b1d47058b92d0e23d8c1b2e472fb0eafca (diff)
downloadservo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.tar.gz
servo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.zip
Introduce Reflectable::global_scope
Diffstat (limited to 'components/script/dom/bluetoothremotegattservice.rs')
-rw-r--r--components/script/dom/bluetoothremotegattservice.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs
index 3a590b4738a..df1718ef403 100644
--- a/components/script/dom/bluetoothremotegattservice.rs
+++ b/components/script/dom/bluetoothremotegattservice.rs
@@ -84,10 +84,8 @@ impl BluetoothRemoteGATTService {
let characteristic = receiver.recv().unwrap();
match characteristic {
Ok(characteristic) => {
- let global = self.global();
- let global = global.r();
- let global = global.as_global_scope();
- let properties = BluetoothCharacteristicProperties::new(global,
+ let global = self.global_scope();
+ let properties = BluetoothCharacteristicProperties::new(&global,
characteristic.broadcast,
characteristic.read,
characteristic.write_without_response,
@@ -97,7 +95,7 @@ impl BluetoothRemoteGATTService {
characteristic.authenticated_signed_writes,
characteristic.reliable_write,
characteristic.writable_auxiliaries);
- Ok(BluetoothRemoteGATTCharacteristic::new(global,
+ Ok(BluetoothRemoteGATTCharacteristic::new(&global,
self,
DOMString::from(characteristic.uuid),
&properties,
@@ -130,10 +128,8 @@ impl BluetoothRemoteGATTService {
match characteristics_vec {
Ok(characteristic_vec) => {
for characteristic in characteristic_vec {
- let global = self.global();
- let global = global.r();
- let global = global.as_global_scope();
- let properties = BluetoothCharacteristicProperties::new(global,
+ let global = self.global_scope();
+ let properties = BluetoothCharacteristicProperties::new(&global,
characteristic.broadcast,
characteristic.read,
characteristic.write_without_response,
@@ -143,7 +139,7 @@ impl BluetoothRemoteGATTService {
characteristic.authenticated_signed_writes,
characteristic.reliable_write,
characteristic.writable_auxiliaries);
- characteristics.push(BluetoothRemoteGATTCharacteristic::new(global,
+ characteristics.push(BluetoothRemoteGATTCharacteristic::new(&global,
self,
DOMString::from(characteristic.uuid),
&properties,
@@ -173,7 +169,7 @@ impl BluetoothRemoteGATTService {
let service = receiver.recv().unwrap();
match service {
Ok(service) => {
- Ok(BluetoothRemoteGATTService::new(self.global().r().as_global_scope(),
+ Ok(BluetoothRemoteGATTService::new(&self.global_scope(),
&self.device.get(),
DOMString::from(service.uuid),
service.is_primary,
@@ -207,7 +203,7 @@ impl BluetoothRemoteGATTService {
match services_vec {
Ok(service_vec) => {
Ok(service_vec.into_iter()
- .map(|service| BluetoothRemoteGATTService::new(self.global().r().as_global_scope(),
+ .map(|service| BluetoothRemoteGATTService::new(&self.global_scope(),
&self.device.get(),
DOMString::from(service.uuid),
service.is_primary,