aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/resource_thread.rs
diff options
context:
space:
mode:
authorbors-servo <infra@servo.org>2023-05-08 11:36:33 +0200
committerGitHub <noreply@github.com>2023-05-08 11:36:33 +0200
commit61f872e7da238860c0e043b57b9bbf37cb7fa893 (patch)
treedbc34351606a8a1236cc981afee714fb6aa4fcb7 /components/net/resource_thread.rs
parentc67d76026463c573c453d298e34a8bfde84d8702 (diff)
parent55de8e3ddc58b239dd0d2de14d5cbfdb418d4873 (diff)
downloadservo-61f872e7da238860c0e043b57b9bbf37cb7fa893.tar.gz
servo-61f872e7da238860c0e043b57b9bbf37cb7fa893.zip
Auto merge of #29710 - servo:rename_sender_receiver_in_constellation, r=mrobinson
Make names of Sender<> and Receiver<> variables more coherent <!-- Please describe your changes on the following line: --> Sometimes these variables are called port, sometimes ipc, sometimes they have the name of the thread on the other end and sometimes not. This PR tries to standardize on an obvious name for all of them: Common pattern to note in this PR: - If it is a `IpcSender`, then naming is followed by `ipc_sender`, such as: `bluetooth_ipc_sender`, `canvas_ipc_sender` etc.. - If variable is `crossbeam_channel` sender/receiver then naming is followed by `sender`/`receiver` such as: `devtools_sender`, `canvas_sender` etc... --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix [#29679](https://github.com/servo/servo/issues/29679) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests <!-- 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. -->
Diffstat (limited to 'components/net/resource_thread.rs')
-rw-r--r--components/net/resource_thread.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs
index 4b858eaa48f..3d656428f6b 100644
--- a/components/net/resource_thread.rs
+++ b/components/net/resource_thread.rs
@@ -55,7 +55,7 @@ use std::time::Duration;
/// Returns a tuple of (public, private) senders to the new threads.
pub fn new_resource_threads(
user_agent: Cow<'static, str>,
- devtools_chan: Option<Sender<DevtoolsControlMsg>>,
+ devtools_sender: Option<Sender<DevtoolsControlMsg>>,
time_profiler_chan: ProfilerChan,
mem_profiler_chan: MemProfilerChan,
embedder_proxy: EmbedderProxy,
@@ -64,7 +64,7 @@ pub fn new_resource_threads(
) -> (ResourceThreads, ResourceThreads) {
let (public_core, private_core) = new_core_resource_thread(
user_agent,
- devtools_chan,
+ devtools_sender,
time_profiler_chan,
mem_profiler_chan,
embedder_proxy,
@@ -81,7 +81,7 @@ pub fn new_resource_threads(
/// Create a CoreResourceThread
pub fn new_core_resource_thread(
user_agent: Cow<'static, str>,
- devtools_chan: Option<Sender<DevtoolsControlMsg>>,
+ devtools_sender: Option<Sender<DevtoolsControlMsg>>,
time_profiler_chan: ProfilerChan,
mem_profiler_chan: MemProfilerChan,
embedder_proxy: EmbedderProxy,
@@ -97,7 +97,7 @@ pub fn new_core_resource_thread(
.spawn(move || {
let resource_manager = CoreResourceManager::new(
user_agent,
- devtools_chan,
+ devtools_sender,
time_profiler_chan,
embedder_proxy,
certificate_path.clone(),
@@ -451,7 +451,7 @@ pub struct AuthCache {
pub struct CoreResourceManager {
user_agent: Cow<'static, str>,
- devtools_chan: Option<Sender<DevtoolsControlMsg>>,
+ devtools_sender: Option<Sender<DevtoolsControlMsg>>,
sw_managers: HashMap<ImmutableOrigin, IpcSender<CustomResponseMediator>>,
filemanager: FileManager,
thread_pool: Arc<CoreResourceThreadPool>,
@@ -586,7 +586,7 @@ impl CoreResourceThreadPool {
impl CoreResourceManager {
pub fn new(
user_agent: Cow<'static, str>,
- devtools_channel: Option<Sender<DevtoolsControlMsg>>,
+ devtools_sender: Option<Sender<DevtoolsControlMsg>>,
_profiler_chan: ProfilerChan,
embedder_proxy: EmbedderProxy,
certificate_path: Option<String>,
@@ -595,7 +595,7 @@ impl CoreResourceManager {
let pool_handle = Arc::new(pool);
CoreResourceManager {
user_agent: user_agent,
- devtools_chan: devtools_channel,
+ devtools_sender,
sw_managers: Default::default(),
filemanager: FileManager::new(embedder_proxy, Arc::downgrade(&pool_handle)),
thread_pool: pool_handle,
@@ -636,7 +636,7 @@ impl CoreResourceManager {
) {
let http_state = http_state.clone();
let ua = self.user_agent.clone();
- let dc = self.devtools_chan.clone();
+ let dc = self.devtools_sender.clone();
let filemanager = self.filemanager.clone();
let timing_type = match request_builder.destination {