aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetoothremotegattdescriptor.rs
diff options
context:
space:
mode:
authorAron Zwaan <aronzwaan@gmail.com>2019-03-30 21:03:20 +0100
committerAron Zwaan <aronzwaan@gmail.com>2019-04-03 20:45:30 +0200
commit782b58587acc754c7b378a84a4b51405738bb081 (patch)
treea530be8317cbda75e8d81679a7abc9fbd6379541 /components/script/dom/bluetoothremotegattdescriptor.rs
parent6fa1853bb1e9bc80271c5259a8d2ed7799a0d6ff (diff)
downloadservo-782b58587acc754c7b378a84a4b51405738bb081.tar.gz
servo-782b58587acc754c7b378a84a4b51405738bb081.zip
Rename Promise::new to Promise::new_in_current_compartment
Diffstat (limited to 'components/script/dom/bluetoothremotegattdescriptor.rs')
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index 983ee355de4..000acdecb6c 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -93,8 +93,9 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-readvalue
+ #[allow(unsafe_code)]
fn ReadValue(&self) -> Rc<Promise> {
- let p = Promise::new(&self.global());
+ let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
// Step 1.
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Reads) {
@@ -125,8 +126,9 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-writevalue
+ #[allow(unsafe_code)]
fn WriteValue(&self, value: ArrayBufferViewOrArrayBuffer) -> Rc<Promise> {
- let p = Promise::new(&self.global());
+ let p = unsafe { Promise::new_in_current_compartment(&self.global()) };
// Step 1.
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Writes) {