aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2020-08-10 10:36:28 -0400
committerJosh Matthews <josh@joshmatthews.net>2020-08-10 10:37:00 -0400
commit79b3cc2a28d490de6a8c594bda6061f4e51513a4 (patch)
tree4dd77d3e76b09b7ddbac0472e2e16b9d4de90c1c /components
parent0cae5fd045bbf7099e144b8b888c93f862c798a3 (diff)
downloadservo-79b3cc2a28d490de6a8c594bda6061f4e51513a4.tar.gz
servo-79b3cc2a28d490de6a8c594bda6061f4e51513a4.zip
Remove stub debugger server.
Diffstat (limited to 'components')
-rw-r--r--components/config/opts.rs23
-rw-r--r--components/constellation/Cargo.toml1
-rw-r--r--components/constellation/constellation.rs14
-rw-r--r--components/debugger/Cargo.toml17
-rw-r--r--components/debugger/lib.rs71
-rw-r--r--components/servo/Cargo.toml1
-rw-r--r--components/servo/lib.rs6
7 files changed, 1 insertions, 132 deletions
diff --git a/components/config/opts.rs b/components/config/opts.rs
index c5ca6907bee..8228336bae8 100644
--- a/components/config/opts.rs
+++ b/components/config/opts.rs
@@ -108,10 +108,6 @@ pub struct Opts {
/// Periodically print out on which events script threads spend their processing time.
pub profile_script_events: bool,
- /// `None` to disable debugger or `Some` with a port number to start a server to listen to
- /// remote Firefox debugger connections.
- pub debugger_port: Option<u16>,
-
/// Port number to start a server to listen to remote Firefox devtools connections.
/// 0 for random port.
pub devtools_port: u16,
@@ -484,7 +480,6 @@ pub fn default_opts() -> Opts {
enable_subpixel_text_antialiasing: true,
enable_canvas_antialiasing: true,
trace_layout: false,
- debugger_port: None,
devtools_port: 0,
devtools_server_enabled: false,
webdriver_port: None,
@@ -589,12 +584,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
"soft-fail",
"Display about:failure on thread failure instead of exiting",
);
- opts.optflagopt(
- "",
- "remote-debugging-port",
- "Start remote debugger server on port",
- "2794",
- );
opts.optflagopt("", "devtools", "Start remote devtools server on port", "0");
opts.optflagopt(
"",
@@ -795,17 +784,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
bubble_inline_sizes_separately = true;
}
- let debugger_port = opt_match
- .opt_default("remote-debugging-port", "2794")
- .map(|port| {
- port.parse().unwrap_or_else(|err| {
- args_fail(&format!(
- "Error parsing option: --remote-debugging-port ({})",
- err
- ))
- })
- });
-
let (devtools_enabled, devtools_port) = if opt_match.opt_present("devtools") {
let port = opt_match
.opt_str("devtools")
@@ -887,7 +865,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
bubble_inline_sizes_separately: bubble_inline_sizes_separately,
profile_script_events: debug_options.profile_script_events,
trace_layout: debug_options.trace_layout,
- debugger_port: debugger_port,
devtools_port: devtools_port,
devtools_server_enabled: devtools_enabled,
webdriver_port: webdriver_port,
diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml
index 29fbccd66d3..2bb5bf03b95 100644
--- a/components/constellation/Cargo.toml
+++ b/components/constellation/Cargo.toml
@@ -17,7 +17,6 @@ bluetooth_traits = { path = "../bluetooth_traits" }
canvas_traits = { path = "../canvas_traits" }
compositing = { path = "../compositing" }
crossbeam-channel = "0.4"
-debugger = { path = "../debugger" }
devtools_traits = { path = "../devtools_traits" }
embedder_traits = { path = "../embedder_traits" }
euclid = "0.20"
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index a9b114fa7bd..5dbacfb939f 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -50,7 +50,7 @@
//! * The font cache, image cache, and resource manager, which load
//! and cache shared fonts, images, or other resources.
//! * The service worker manager.
-//! * The devtools, debugger and webdriver servers.
+//! * The devtools and webdriver servers.
//!
//! The constellation passes messages between the threads, and updates its state
//! to track the evolving state of the browsing context tree.
@@ -357,10 +357,6 @@ pub struct Constellation<Message, LTF, STF, SWF> {
font_cache_thread: FontCacheThread,
/// A channel for the constellation to send messages to the
- /// debugger thread.
- debugger_chan: Option<debugger::Sender>,
-
- /// A channel for the constellation to send messages to the
/// devtools thread.
devtools_chan: Option<Sender<DevtoolsControlMsg>>,
@@ -526,9 +522,6 @@ pub struct InitialConstellationState {
/// A channel through which messages can be sent to the compositor.
pub compositor_proxy: CompositorProxy,
- /// A channel to the debugger, if applicable.
- pub debugger_chan: Option<debugger::Sender>,
-
/// A channel to the developer tools, if applicable.
pub devtools_chan: Option<Sender<DevtoolsControlMsg>>,
@@ -872,7 +865,6 @@ where
compositor_proxy: state.compositor_proxy,
active_browser_id: None,
browsers: HashMap::new(),
- debugger_chan: state.debugger_chan,
devtools_chan: state.devtools_chan,
bluetooth_thread: state.bluetooth_thread,
public_resource_threads: state.public_resource_threads,
@@ -2739,10 +2731,6 @@ where
warn!("Exit resource thread failed ({})", e);
}
- if let Some(ref chan) = self.debugger_chan {
- debugger::shutdown_server(chan);
- }
-
if let Some(ref chan) = self.devtools_chan {
debug!("Exiting devtools.");
let msg = DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::ServerExitMsg);
diff --git a/components/debugger/Cargo.toml b/components/debugger/Cargo.toml
deleted file mode 100644
index 41f9714f41b..00000000000
--- a/components/debugger/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[package]
-name = "debugger"
-version = "0.0.1"
-authors = ["The Servo Project Developers"]
-license = "MPL-2.0"
-edition = "2018"
-publish = false
-
-[lib]
-name = "debugger"
-path = "lib.rs"
-crate_type = ["rlib"]
-
-[dependencies]
-crossbeam-channel = "0.4"
-log = "0.4"
-ws = "0.9"
diff --git a/components/debugger/lib.rs b/components/debugger/lib.rs
deleted file mode 100644
index b26c843b0aa..00000000000
--- a/components/debugger/lib.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#[macro_use]
-extern crate log;
-
-use std::thread;
-use ws::{self, Builder, CloseCode, Handler, Handshake};
-
-enum Message {
- ShutdownServer,
-}
-
-pub struct Sender(crossbeam_channel::Sender<Message>);
-
-struct Connection {
- sender: ws::Sender,
-}
-
-impl Handler for Connection {
- fn on_open(&mut self, _: Handshake) -> ws::Result<()> {
- debug!("Connection opened.");
- Ok(())
- }
-
- fn on_close(&mut self, _: CloseCode, _: &str) {
- debug!("Connection closed.");
- }
-
- fn on_message(&mut self, message: ws::Message) -> ws::Result<()> {
- self.sender.send(message)
- }
-}
-
-pub fn start_server(port: u16) -> Sender {
- debug!("Starting server.");
- let (sender, receiver) = crossbeam_channel::unbounded();
- thread::Builder::new()
- .name("debugger".to_owned())
- .spawn(move || {
- let socket = Builder::new()
- .build(|sender: ws::Sender| Connection { sender: sender })
- .unwrap();
- let sender = socket.broadcaster();
- thread::Builder::new()
- .name("debugger-websocket".to_owned())
- .spawn(move || {
- socket.listen(("127.0.0.1", port)).unwrap();
- })
- .expect("Thread spawning failed");
- while let Ok(message) = receiver.recv() {
- match message {
- Message::ShutdownServer => {
- break;
- },
- }
- }
- sender.shutdown().unwrap();
- })
- .expect("Thread spawning failed");
- Sender(sender)
-}
-
-pub fn shutdown_server(sender: &Sender) {
- debug!("Shutting down server.");
- let &Sender(ref sender) = sender;
- if let Err(_) = sender.send(Message::ShutdownServer) {
- warn!("Failed to shut down server.");
- }
-}
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml
index 3b653fcac84..15aff372673 100644
--- a/components/servo/Cargo.toml
+++ b/components/servo/Cargo.toml
@@ -46,7 +46,6 @@ canvas_traits = { path = "../canvas_traits" }
compositing = { path = "../compositing", features = ["gl"] }
constellation = { path = "../constellation" }
crossbeam-channel = "0.4"
-debugger = { path = "../debugger" }
devtools = { path = "../devtools" }
devtools_traits = { path = "../devtools_traits" }
embedder_traits = { path = "../embedder_traits" }
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 09e6a3ef078..b6a0499f15d 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -27,7 +27,6 @@ pub use canvas;
pub use canvas_traits;
pub use compositing;
pub use constellation;
-pub use debugger;
pub use devtools;
pub use devtools_traits;
pub use embedder_traits;
@@ -354,8 +353,6 @@ where
);
let mem_profiler_chan = profile_mem::Profiler::create(opts.mem_profiler_period);
- let debugger_chan = opts.debugger_port.map(|port| debugger::start_server(port));
-
let devtools_chan = if opts.devtools_server_enabled {
Some(devtools::start_server(
opts.devtools_port,
@@ -500,7 +497,6 @@ where
compositor_proxy.clone(),
time_profiler_chan.clone(),
mem_profiler_chan.clone(),
- debugger_chan,
devtools_chan,
webrender_document,
webrender_api_sender,
@@ -857,7 +853,6 @@ fn create_constellation(
compositor_proxy: CompositorProxy,
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: mem::ProfilerChan,
- debugger_chan: Option<debugger::Sender>,
devtools_chan: Option<Sender<devtools_traits::DevtoolsControlMsg>>,
webrender_document: webrender_api::DocumentId,
webrender_api_sender: webrender_api::RenderApiSender,
@@ -899,7 +894,6 @@ fn create_constellation(
let initial_state = InitialConstellationState {
compositor_proxy,
embedder_proxy,
- debugger_chan,
devtools_chan,
bluetooth_thread,
font_cache_thread,