diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-22 06:51:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-22 06:51:16 -0800 |
commit | 23590f683a06b67f666e83009513b67ed8225ce7 (patch) | |
tree | 073ae6944c5679bf01a2284cc871628e6e890a83 /components/script/dom/bluetooth.rs | |
parent | b843be49752c68926521a8b5f6b0405b1ff01e9b (diff) | |
parent | 6e02cb2eb99cd633579ed99acef2240f90f173c5 (diff) | |
download | servo-23590f683a06b67f666e83009513b67ed8225ce7.tar.gz servo-23590f683a06b67f666e83009513b67ed8225ce7.zip |
Auto merge of #14612 - szeged:connect-disconnect-update, r=jdm
Updating GATTServer's Connect/Disconnect calls
<!-- Please describe your changes on the following line: -->
Added the missing [Step 5.2.3](https://github.com/servo/servo/compare/master...szeged:connect-disconnect-update#diff-1dbe29f87740f5aec93f37adbecace6cR213) to the `connect` function.
Updated the [disconnect](https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-disconnect) function to its current state in the specification, including the `clean_up_disconnected_device` and the `garbage_collect_the connection` functions.
Added new tests for checking the invalid state of JS objects after disconnection.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14612)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bluetooth.rs')
-rw-r--r-- | components/script/dom/bluetooth.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs index 29b5ee5aa72..dcbb398a4ee 100644 --- a/components/script/dom/bluetooth.rs +++ b/components/script/dom/bluetooth.rs @@ -104,6 +104,10 @@ impl Bluetooth { self.global().as_window().bluetooth_thread() } + pub fn get_device_map(&self) -> &DOMRefCell<HashMap<String, MutJS<BluetoothDevice>>> { + &self.device_instance_map + } + // https://webbluetoothcg.github.io/web-bluetooth/#request-bluetooth-devices fn request_bluetooth_devices(&self, p: &Rc<Promise>, |