aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory Terzian <gterzian@users.noreply.github.com>2020-03-26 00:34:48 +0800
committerGregory Terzian <gterzian@users.noreply.github.com>2020-03-31 00:49:28 +0800
commit53497fe87f21eb363f04048ef19f755bb39c940a (patch)
tree22b42ed948dcc8d2f7022d7c9e71fde2f0933366
parent67b433648c79a8b397213605311011e22d707cec (diff)
downloadservo-53497fe87f21eb363f04048ef19f755bb39c940a.tar.gz
servo-53497fe87f21eb363f04048ef19f755bb39c940a.zip
shutting down IPC router thread when a process shuts down.
-rw-r--r--Cargo.lock4
-rw-r--r--components/constellation/constellation.rs3
-rw-r--r--components/script/script_thread.rs7
3 files changed, 12 insertions, 2 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e5ef56bb0de..4b3516c54d5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2748,9 +2748,9 @@ dependencies = [
[[package]]
name = "ipc-channel"
-version = "0.14.0"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55162cbe44dacbc0b4a66d1067c885a9d5975f068a432801bba0493e1ece7a51"
+checksum = "3698b8affd5656032a074a7d40b3c2a29b71971f3e1ff6042b9d40724e20d97c"
dependencies = [
"bincode",
"crossbeam-channel",
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index f0a6c513d66..25ba57b04df 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -2833,6 +2833,9 @@ where
debug!("Asking compositor to complete shutdown.");
self.compositor_proxy
.send(ToCompositorMsg::ShutdownComplete);
+
+ debug!("Shutting-down IPC router thread in constellation.");
+ ROUTER.shutdown();
}
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index dd0f798fcec..94aac4841da 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -145,6 +145,7 @@ use script_traits::{ScriptToConstellationChan, TimerSchedulerMsg};
use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WheelDelta};
use script_traits::{UpdatePipelineIdReason, WebrenderIpcSender, WindowSizeData, WindowSizeType};
use servo_atoms::Atom;
+use servo_config::opts;
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use std::borrow::Cow;
use std::cell::Cell;
@@ -2908,6 +2909,12 @@ impl ScriptThread {
.as_ref()
.map(|bhm| bhm.unregister());
+ // If we're in multiprocess mode, shut-down the IPC router for this process.
+ if opts::multiprocess() {
+ debug!("Exiting IPC router thread in script thread.");
+ ROUTER.shutdown();
+ }
+
debug!("Exited script thread.");
}