aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/messaging.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-01-10 03:19:19 -0500
committerGitHub <noreply@github.com>2025-01-10 08:19:19 +0000
commitc94d909a8688589209cdf0c7ae58e40f9b8c411e (patch)
tree12febf23eed4438249fd4d276c4d8b35dee22a97 /components/script/messaging.rs
parentf220d6d3a52296794cd19935e9e59cc75a179a44 (diff)
downloadservo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.tar.gz
servo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.zip
script: Limit public exports. (#34915)
* script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script/messaging.rs')
-rw-r--r--components/script/messaging.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/components/script/messaging.rs b/components/script/messaging.rs
index 7dd1db6b3ba..d0fa7e7e38e 100644
--- a/components/script/messaging.rs
+++ b/components/script/messaging.rs
@@ -130,7 +130,7 @@ pub(crate) enum MainThreadScriptMsg {
}
/// Common messages used to control the event loops in both the script and the worker
-pub enum CommonScriptMsg {
+pub(crate) enum CommonScriptMsg {
/// Requests that the script thread measure its memory usage. The results are sent back via the
/// supplied channel.
CollectReports(ReportsChan),
@@ -297,68 +297,68 @@ impl OpaqueSender<CommonScriptMsg> for ScriptEventLoopSender {
pub(crate) struct ScriptThreadSenders {
/// A channel to hand out to script thread-based entities that need to be able to enqueue
/// events in the event queue.
- pub self_sender: Sender<MainThreadScriptMsg>,
+ pub(crate) self_sender: Sender<MainThreadScriptMsg>,
/// A handle to the bluetooth thread.
#[no_trace]
- pub bluetooth_sender: IpcSender<BluetoothRequest>,
+ pub(crate) bluetooth_sender: IpcSender<BluetoothRequest>,
/// A [`Sender`] that sends messages to the `Constellation`.
#[no_trace]
- pub constellation_sender: IpcSender<ConstellationControlMsg>,
+ pub(crate) constellation_sender: IpcSender<ConstellationControlMsg>,
/// A [`Sender`] that sends messages to the `Constellation` associated with
/// particular pipelines.
#[no_trace]
- pub pipeline_to_constellation_sender: IpcSender<(PipelineId, ScriptMsg)>,
+ pub(crate) pipeline_to_constellation_sender: IpcSender<(PipelineId, ScriptMsg)>,
/// A sender for layout to communicate to the constellation.
#[no_trace]
- pub layout_to_constellation_ipc_sender: IpcSender<LayoutMsg>,
+ pub(crate) layout_to_constellation_ipc_sender: IpcSender<LayoutMsg>,
/// The [`Sender`] on which messages can be sent to the `ImageCache`.
#[no_trace]
- pub image_cache_sender: Sender<ImageCacheMsg>,
+ pub(crate) image_cache_sender: Sender<ImageCacheMsg>,
/// For providing contact with the time profiler.
#[no_trace]
- pub time_profiler_sender: profile_time::ProfilerChan,
+ pub(crate) time_profiler_sender: profile_time::ProfilerChan,
/// For providing contact with the memory profiler.
#[no_trace]
- pub memory_profiler_sender: profile_mem::ProfilerChan,
+ pub(crate) memory_profiler_sender: profile_mem::ProfilerChan,
/// For providing instructions to an optional devtools server.
#[no_trace]
- pub devtools_server_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
+ pub(crate) devtools_server_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
#[no_trace]
- pub devtools_client_to_script_thread_sender: IpcSender<DevtoolScriptControlMsg>,
+ pub(crate) devtools_client_to_script_thread_sender: IpcSender<DevtoolScriptControlMsg>,
#[no_trace]
- pub content_process_shutdown_sender: Sender<()>,
+ pub(crate) content_process_shutdown_sender: Sender<()>,
}
#[derive(JSTraceable)]
pub(crate) struct ScriptThreadReceivers {
/// A [`Receiver`] that receives messages from the constellation.
#[no_trace]
- pub constellation_receiver: Receiver<ConstellationControlMsg>,
+ pub(crate) constellation_receiver: Receiver<ConstellationControlMsg>,
/// The [`Receiver`] which receives incoming messages from the `ImageCache`.
#[no_trace]
- pub image_cache_receiver: Receiver<ImageCacheMsg>,
+ pub(crate) image_cache_receiver: Receiver<ImageCacheMsg>,
/// For receiving commands from an optional devtools server. Will be ignored if no such server
/// exists. When devtools are not active this will be [`crossbeam_channel::never()`].
#[no_trace]
- pub devtools_server_receiver: Receiver<DevtoolScriptControlMsg>,
+ pub(crate) devtools_server_receiver: Receiver<DevtoolScriptControlMsg>,
/// Receiver to receive commands from optional WebGPU server. When there is no active
/// WebGPU context, this will be [`crossbeam_channel::never()`].
#[no_trace]
#[cfg(feature = "webgpu")]
- pub webgpu_receiver: RefCell<Receiver<WebGPUMsg>>,
+ pub(crate) webgpu_receiver: RefCell<Receiver<WebGPUMsg>>,
}
impl ScriptThreadReceivers {