aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetoothremotegattserver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bluetoothremotegattserver.rs')
-rw-r--r--components/script/dom/bluetoothremotegattserver.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs
index 62810f04091..005f0dad2ca 100644
--- a/components/script/dom/bluetoothremotegattserver.rs
+++ b/components/script/dom/bluetoothremotegattserver.rs
@@ -69,9 +69,10 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connect
+ #[allow(unsafe_code)]
fn Connect(&self) -> Rc<Promise> {
// Step 1.
- let p = Promise::new(&self.global());
+ let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
let sender = response_async(&p, self);
// TODO: Step 3: Check if the UA is currently using the Bluetooth system.