Replace mpsc with crossbeam/servo channel, update ipc-channel

Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
This commit is contained in:
Simon Sapin 2017-12-17 23:53:32 +01:00 committed by Gregory Terzian
parent b977b4994c
commit 2a996fbc8f
89 changed files with 341 additions and 377 deletions

View file

@ -15,13 +15,14 @@ cookie = "0.10"
euclid = "0.19"
hyper = "0.10"
image = "0.19"
ipc-channel = "0.10"
ipc-channel = "0.11"
log = "0.4"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
regex = "1.0"
rustc-serialize = "0.3.4"
script_traits = {path = "../script_traits"}
servo_channel = {path = "../channel"}
servo_config = {path = "../config"}
servo_url = {path = "../url"}
url = "1.2"

View file

@ -19,6 +19,7 @@ extern crate net_traits;
extern crate regex;
extern crate rustc_serialize;
extern crate script_traits;
extern crate servo_channel;
extern crate servo_config;
extern crate servo_url;
extern crate uuid;
@ -38,12 +39,12 @@ use rustc_serialize::json::{Json, ToJson};
use script_traits::{ConstellationMsg, LoadData, WebDriverCommandMsg};
use script_traits::webdriver_msg::{LoadStatus, WebDriverCookieError, WebDriverFrameId};
use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult, WebDriverScriptCommand};
use servo_channel::Sender;
use servo_config::prefs::{PREFS, PrefValue};
use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::collections::BTreeMap;
use std::net::{SocketAddr, SocketAddrV4};
use std::sync::mpsc::Sender;
use std::thread;
use std::time::Duration;
use uuid::Uuid;
@ -1180,7 +1181,7 @@ impl WebDriverHandler<ServoExtensionRoute> for Handler {
fn delete_session(&mut self, _session: &Option<Session>) {
// Servo doesn't support multiple sessions, so we exit on session deletion
let _ = self.constellation_chan.send(ConstellationMsg::Exit);
let _ = self.constellation_chan.send(ConstellationMsg::Exit).unwrap();
self.session = None;
}
}