mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #26036 - gterzian:add_ipc_router_shutdown, r=Manishearth
Add ipc router shutdown <!-- Please describe your changes on the following line: --> Explicitly shutting down IPC router as part of shutdown, for contexts see https://github.com/servo/servo/pull/25685#pullrequestreview-364604068 Note that the call to `shutdown` is idempotent, so it shouldn't matter whether the call in the constellation and the script-thread are actually on the same `ROUTER` in single-process mode... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
c8479c8b90
3 changed files with 12 additions and 2 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -2755,9 +2755,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ipc-channel"
|
name = "ipc-channel"
|
||||||
version = "0.14.0"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "55162cbe44dacbc0b4a66d1067c885a9d5975f068a432801bba0493e1ece7a51"
|
checksum = "3698b8affd5656032a074a7d40b3c2a29b71971f3e1ff6042b9d40724e20d97c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
|
|
|
@ -2833,6 +2833,9 @@ where
|
||||||
debug!("Asking compositor to complete shutdown.");
|
debug!("Asking compositor to complete shutdown.");
|
||||||
self.compositor_proxy
|
self.compositor_proxy
|
||||||
.send(ToCompositorMsg::ShutdownComplete);
|
.send(ToCompositorMsg::ShutdownComplete);
|
||||||
|
|
||||||
|
debug!("Shutting-down IPC router thread in constellation.");
|
||||||
|
ROUTER.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {
|
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {
|
||||||
|
|
|
@ -145,6 +145,7 @@ use script_traits::{ScriptToConstellationChan, TimerSchedulerMsg};
|
||||||
use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WheelDelta};
|
use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WheelDelta};
|
||||||
use script_traits::{UpdatePipelineIdReason, WebrenderIpcSender, WindowSizeData, WindowSizeType};
|
use script_traits::{UpdatePipelineIdReason, WebrenderIpcSender, WindowSizeData, WindowSizeType};
|
||||||
use servo_atoms::Atom;
|
use servo_atoms::Atom;
|
||||||
|
use servo_config::opts;
|
||||||
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
@ -2908,6 +2909,12 @@ impl ScriptThread {
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|bhm| bhm.unregister());
|
.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.");
|
debug!("Exited script thread.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue