Propagate CanGc arguments through callers in constructors (#35541)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-20 17:17:45 +01:00 committed by GitHub
parent 5465bfc2af
commit 863d2ce871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
260 changed files with 986 additions and 603 deletions

View file

@ -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(),