diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-21 16:00:48 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-21 16:00:48 +0200 |
commit | 5addc2dfa36a48a657c36ecbda0331bfaa8ebf11 (patch) | |
tree | db35ab2ddce4a406097d59f697ccc01ab0a555f7 /components/script/dom/bluetoothpermissionresult.rs | |
parent | 658dc8a5013973ceff3c91291d5536043b2e8e58 (diff) | |
download | servo-5addc2dfa36a48a657c36ecbda0331bfaa8ebf11.tar.gz servo-5addc2dfa36a48a657c36ecbda0331bfaa8ebf11.zip |
Make Promise::resolve_native actually sound
We shouldn't have to pass a raw JSContext pointer, and to enter the
promise's context's compartment by hand.
Diffstat (limited to 'components/script/dom/bluetoothpermissionresult.rs')
-rw-r--r-- | components/script/dom/bluetoothpermissionresult.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bluetoothpermissionresult.rs b/components/script/dom/bluetoothpermissionresult.rs index da5de4bf5b1..36b3eb00192 100644 --- a/components/script/dom/bluetoothpermissionresult.rs +++ b/components/script/dom/bluetoothpermissionresult.rs @@ -98,7 +98,7 @@ impl AsyncBluetoothListener for BluetoothPermissionResult { // https://w3c.github.io/permissions/#dom-permissions-request // Step 8. - return promise.resolve_native(promise_cx, self); + return promise.resolve_native(self); } let bt_device = BluetoothDevice::new(&self.global(), DOMString::from(device.id.clone()), @@ -117,7 +117,7 @@ impl AsyncBluetoothListener for BluetoothPermissionResult { // https://w3c.github.io/permissions/#dom-permissions-request // Step 8. - promise.resolve_native(promise_cx, self); + promise.resolve_native(self); }, _ => promise.reject_error(promise_cx, Error::Type("Something went wrong...".to_owned())), } |