Auto merge of #13909 - dati91:promise-queue, r=jdm

Webbluetooth Async behaviour

<!-- Please describe your changes on the following line: -->

Note: depends on https://github.com/servo/servo/pull/13612

The current WBT communication is synchronous. With this, it should work properly (except the disconnect function, which will need some more work, because the current implementation differ from the spec).

<!-- 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

<!-- Either: -->
- [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/13909)

<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-08 09:05:12 -06:00 committed by GitHub
commit 1153ca9841
19 changed files with 806 additions and 729 deletions

View file

@ -1571,6 +1571,7 @@ dependencies = [
name = "net_traits"
version = "0.0.1"
dependencies = [
"bluetooth_traits 0.0.1",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -64,7 +64,7 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
use bluetooth::BluetoothThreadFactory;
use bluetooth_traits::BluetoothMethodMsg;
use bluetooth_traits::BluetoothRequest;
use compositing::{CompositorProxy, IOCompositor};
use compositing::compositor_thread::InitialCompositorState;
use compositing::windowing::WindowEvent;
@ -247,7 +247,7 @@ fn create_constellation(opts: opts::Opts,
supports_clipboard: bool,
webrender_api_sender: webrender_traits::RenderApiSender)
-> (Sender<ConstellationMsg>, SWManagerSenders) {
let bluetooth_thread: IpcSender<BluetoothMethodMsg> = BluetoothThreadFactory::new();
let bluetooth_thread: IpcSender<BluetoothRequest> = BluetoothThreadFactory::new();
let (public_resource_threads, private_resource_threads) =
new_resource_threads(opts.user_agent,