aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetooth/bluetooth.rs
diff options
context:
space:
mode:
authorAuguste Baum <52001167+augustebaum@users.noreply.github.com>2025-02-20 17:17:45 +0100
committerGitHub <noreply@github.com>2025-02-20 16:17:45 +0000
commit863d2ce8710fc5141b2c8fd0743697c0956412cb (patch)
tree05d3f853fa53b38a359427ac3d9ff19b7bc75db6 /components/script/dom/bluetooth/bluetooth.rs
parent5465bfc2af38e561df5f0a7f81250a0238520d6d (diff)
downloadservo-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/bluetooth.rs')
-rw-r--r--components/script/dom/bluetooth/bluetooth.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/bluetooth/bluetooth.rs b/components/script/dom/bluetooth/bluetooth.rs
index 4e47c9664bf..7ea54e11d20 100644
--- a/components/script/dom/bluetooth/bluetooth.rs
+++ b/components/script/dom/bluetooth/bluetooth.rs
@@ -151,8 +151,8 @@ impl Bluetooth {
}
}
- pub(crate) fn new(global: &GlobalScope) -> DomRoot<Bluetooth> {
- reflect_dom_object(Box::new(Bluetooth::new_inherited()), global, CanGc::note())
+ pub(crate) fn new(global: &GlobalScope, can_gc: CanGc) -> DomRoot<Bluetooth> {
+ reflect_dom_object(Box::new(Bluetooth::new_inherited()), global, can_gc)
}
fn get_bluetooth_thread(&self) -> IpcSender<BluetoothRequest> {
@@ -582,7 +582,7 @@ impl BluetoothMethods<crate::DomTypeHolder> for Bluetooth {
}
impl AsyncBluetoothListener for Bluetooth {
- fn handle_response(&self, response: BluetoothResponse, promise: &Rc<Promise>, _can_gc: CanGc) {
+ fn handle_response(&self, response: BluetoothResponse, promise: &Rc<Promise>, can_gc: CanGc) {
match response {
// https://webbluetoothcg.github.io/web-bluetooth/#request-bluetooth-devices
// Step 11, 13 - 14.
@@ -596,6 +596,7 @@ impl AsyncBluetoothListener for Bluetooth {
DOMString::from(device.id.clone()),
device.name.map(DOMString::from),
self,
+ can_gc,
);
device_instance_map.insert(device.id.clone(), Dom::from_ref(&bt_device));