diff options
author | Auguste Baum <52001167+augustebaum@users.noreply.github.com> | 2025-02-20 17:17:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-20 16:17:45 +0000 |
commit | 863d2ce8710fc5141b2c8fd0743697c0956412cb (patch) | |
tree | 05d3f853fa53b38a359427ac3d9ff19b7bc75db6 /components/script/dom/bluetooth/bluetoothdevice.rs | |
parent | 5465bfc2af38e561df5f0a7f81250a0238520d6d (diff) | |
download | servo-863d2ce8710fc5141b2c8fd0743697c0956412cb.tar.gz servo-863d2ce8710fc5141b2c8fd0743697c0956412cb.zip |
Propagate `CanGc` arguments through callers in constructors (#35541)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
Diffstat (limited to 'components/script/dom/bluetooth/bluetoothdevice.rs')
-rw-r--r-- | components/script/dom/bluetooth/bluetoothdevice.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script/dom/bluetooth/bluetoothdevice.rs b/components/script/dom/bluetooth/bluetoothdevice.rs index 4a7783be899..49f38d6f843 100644 --- a/components/script/dom/bluetooth/bluetoothdevice.rs +++ b/components/script/dom/bluetooth/bluetoothdevice.rs @@ -81,17 +81,18 @@ impl BluetoothDevice { id: DOMString, name: Option<DOMString>, context: &Bluetooth, + can_gc: CanGc, ) -> DomRoot<BluetoothDevice> { reflect_dom_object( Box::new(BluetoothDevice::new_inherited(id, name, context)), global, - CanGc::note(), + can_gc, ) } pub(crate) fn get_gatt(&self) -> DomRoot<BluetoothRemoteGATTServer> { self.gatt - .or_init(|| BluetoothRemoteGATTServer::new(&self.global(), self)) + .or_init(|| BluetoothRemoteGATTServer::new(&self.global(), self, CanGc::note())) } fn get_context(&self) -> DomRoot<Bluetooth> { @@ -114,6 +115,7 @@ impl BluetoothDevice { DOMString::from(service.uuid.clone()), service.is_primary, service.instance_id.clone(), + CanGc::note(), ); service_map.insert(service.instance_id.clone(), Dom::from_ref(&bt_service)); bt_service @@ -140,6 +142,7 @@ impl BluetoothDevice { characteristic.authenticated_signed_writes, characteristic.reliable_write, characteristic.writable_auxiliaries, + CanGc::note(), ); let bt_characteristic = BluetoothRemoteGATTCharacteristic::new( &service.global(), @@ -147,6 +150,7 @@ impl BluetoothDevice { DOMString::from(characteristic.uuid.clone()), &properties, characteristic.instance_id.clone(), + CanGc::note(), ); characteristic_map.insert( characteristic.instance_id.clone(), @@ -181,6 +185,7 @@ impl BluetoothDevice { characteristic, DOMString::from(descriptor.uuid.clone()), descriptor.instance_id.clone(), + CanGc::note(), ); descriptor_map.insert( descriptor.instance_id.clone(), |