diff --git a/components/background_hang_monitor/background_hang_monitor.rs b/components/background_hang_monitor/background_hang_monitor.rs index b97ec3bceec..fb51df811a4 100644 --- a/components/background_hang_monitor/background_hang_monitor.rs +++ b/components/background_hang_monitor/background_hang_monitor.rs @@ -103,7 +103,7 @@ impl BackgroundHangMonitorClone for HangMonitorRegister { } /// Messages sent from monitored components to the monitor. -pub enum MonitoredComponentMsg { +enum MonitoredComponentMsg { /// Register component for monitoring, Register( Box, @@ -123,7 +123,7 @@ pub enum MonitoredComponentMsg { /// A wrapper around a sender to the monitor, /// which will send the Id of the monitored component along with each message, /// and keep track of whether the monitor is still listening on the other end. -pub struct BackgroundHangMonitorChan { +struct BackgroundHangMonitorChan { sender: Sender<(MonitoredComponentId, MonitoredComponentMsg)>, component_id: MonitoredComponentId, disconnected: Cell, @@ -131,7 +131,7 @@ pub struct BackgroundHangMonitorChan { } impl BackgroundHangMonitorChan { - pub fn new( + fn new( sender: Sender<(MonitoredComponentId, MonitoredComponentMsg)>, component_id: MonitoredComponentId, monitoring_enabled: bool, @@ -144,7 +144,7 @@ impl BackgroundHangMonitorChan { } } - pub fn send(&self, msg: MonitoredComponentMsg) { + fn send(&self, msg: MonitoredComponentMsg) { if self.disconnected.get() { return; } @@ -188,7 +188,7 @@ struct MonitoredComponent { struct Sample(MonitoredComponentId, Instant, NativeStack); -pub struct BackgroundHangMonitorWorker { +struct BackgroundHangMonitorWorker { component_names: HashMap, monitored_components: HashMap, constellation_chan: IpcSender, @@ -204,7 +204,7 @@ pub struct BackgroundHangMonitorWorker { } impl BackgroundHangMonitorWorker { - pub fn new( + fn new( constellation_chan: IpcSender, control_port: IpcReceiver, port: Receiver<(MonitoredComponentId, MonitoredComponentMsg)>, @@ -268,7 +268,7 @@ impl BackgroundHangMonitorWorker { .send(HangMonitorAlert::Profile(bytes)); } - pub fn run(&mut self) -> bool { + fn run(&mut self) -> bool { let tick = if let Some(duration) = self.sampling_duration { let duration = duration .checked_sub(Instant::now() - self.last_sample)