mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
This commit is contained in:
parent
b977b4994c
commit
2a996fbc8f
89 changed files with 341 additions and 377 deletions
|
@ -32,6 +32,7 @@ canvas = {path = "../canvas"}
|
|||
canvas_traits = {path = "../canvas_traits"}
|
||||
compositing = {path = "../compositing", features = ["gleam"]}
|
||||
constellation = {path = "../constellation"}
|
||||
crossbeam-channel = "0.2"
|
||||
debugger = {path = "../debugger"}
|
||||
devtools = {path = "../devtools"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
|
@ -40,7 +41,7 @@ env_logger = "0.5"
|
|||
euclid = "0.19"
|
||||
gfx = {path = "../gfx"}
|
||||
gleam = "0.6"
|
||||
ipc-channel = "0.10"
|
||||
ipc-channel = "0.11"
|
||||
layout_thread = {path = "../layout_thread"}
|
||||
log = "0.4"
|
||||
msg = {path = "../msg"}
|
||||
|
|
|
@ -28,7 +28,6 @@ pub extern crate bluetooth;
|
|||
pub extern crate bluetooth_traits;
|
||||
pub extern crate canvas;
|
||||
pub extern crate canvas_traits;
|
||||
pub extern crate servo_channel;
|
||||
pub extern crate compositing;
|
||||
pub extern crate constellation;
|
||||
pub extern crate debugger;
|
||||
|
@ -47,6 +46,7 @@ pub extern crate profile_traits;
|
|||
pub extern crate script;
|
||||
pub extern crate script_traits;
|
||||
pub extern crate script_layout_interface;
|
||||
pub extern crate servo_channel;
|
||||
pub extern crate servo_config;
|
||||
pub extern crate servo_geometry;
|
||||
pub extern crate servo_url;
|
||||
|
@ -96,13 +96,13 @@ use profile::time as profile_time;
|
|||
use profile_traits::mem;
|
||||
use profile_traits::time;
|
||||
use script_traits::{ConstellationMsg, SWManagerSenders, ScriptToConstellationChan};
|
||||
use servo_channel::{Sender, channel};
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::borrow::Cow;
|
||||
use std::cmp::max;
|
||||
use std::path::PathBuf;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use webrender::RendererKind;
|
||||
use webvr::{WebVRThread, WebVRCompositorHandler};
|
||||
|
||||
|
@ -276,7 +276,7 @@ where
|
|||
WindowEvent::LoadUrl(top_level_browsing_context_id, url) => {
|
||||
let msg = ConstellationMsg::LoadUrl(top_level_browsing_context_id, url);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending load url to constellation failed ({}).", e);
|
||||
warn!("Sending load url to constellation failed ({:?}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -314,14 +314,14 @@ where
|
|||
let msg =
|
||||
ConstellationMsg::TraverseHistory(top_level_browsing_context_id, direction);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending navigation to constellation failed ({}).", e);
|
||||
warn!("Sending navigation to constellation failed ({:?}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
WindowEvent::KeyEvent(ch, key, state, modifiers) => {
|
||||
let msg = ConstellationMsg::KeyEvent(ch, key, state, modifiers);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending key event to constellation failed ({}).", e);
|
||||
warn!("Sending key event to constellation failed ({:?}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -332,7 +332,7 @@ where
|
|||
WindowEvent::Reload(top_level_browsing_context_id) => {
|
||||
let msg = ConstellationMsg::Reload(top_level_browsing_context_id);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending reload to constellation failed ({}).", e);
|
||||
warn!("Sending reload to constellation failed ({:?}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -348,7 +348,7 @@ where
|
|||
let msg = ConstellationMsg::NewBrowser(url, browser_id);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!(
|
||||
"Sending NewBrowser message to constellation failed ({}).",
|
||||
"Sending NewBrowser message to constellation failed ({:?}).",
|
||||
e
|
||||
);
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ where
|
|||
let msg = ConstellationMsg::SelectBrowser(ctx);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!(
|
||||
"Sending SelectBrowser message to constellation failed ({}).",
|
||||
"Sending SelectBrowser message to constellation failed ({:?}).",
|
||||
e
|
||||
);
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ where
|
|||
let msg = ConstellationMsg::CloseBrowser(ctx);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!(
|
||||
"Sending CloseBrowser message to constellation failed ({}).",
|
||||
"Sending CloseBrowser message to constellation failed ({:?}).",
|
||||
e
|
||||
);
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ where
|
|||
WindowEvent::SendError(ctx, e) => {
|
||||
let msg = ConstellationMsg::SendError(ctx, e);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending SendError message to constellation failed ({}).", e);
|
||||
warn!("Sending SendError message to constellation failed ({:?}).", e);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue