Cleaned up ripples due to MutJS to JS type change

This commit is contained in:
Prudhvi Rampey 2017-01-06 23:31:00 +05:30
parent 7e3c9e2197
commit 29340b7adf
6 changed files with 38 additions and 38 deletions

View file

@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
use dom::bindings::error::Error;
use dom::bindings::error::ErrorResult;
use dom::bindings::js::{MutJS, Root};
use dom::bindings::js::{JS, Root};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
use dom::bluetoothdevice::BluetoothDevice;
@ -24,7 +24,7 @@ use std::rc::Rc;
#[dom_struct]
pub struct BluetoothRemoteGATTServer {
reflector_: Reflector,
device: MutJS<BluetoothDevice>,
device: JS<BluetoothDevice>,
connected: Cell<bool>,
}
@ -32,7 +32,7 @@ impl BluetoothRemoteGATTServer {
pub fn new_inherited(device: &BluetoothDevice) -> BluetoothRemoteGATTServer {
BluetoothRemoteGATTServer {
reflector_: Reflector::new(),
device: MutJS::new(device),
device: JS::from_ref(device),
connected: Cell::new(false),
}
}
@ -55,7 +55,7 @@ impl BluetoothRemoteGATTServer {
impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-device
fn Device(&self) -> Root<BluetoothDevice> {
self.device.get()
Root::from_ref(&self.device)
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connected