mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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>
This commit is contained in:
parent
f220d6d3a5
commit
c94d909a86
585 changed files with 5411 additions and 5013 deletions
|
@ -23,7 +23,7 @@ use crate::task_manager::TaskManager;
|
|||
/// Note: When adding or removing a [`TaskSourceName`], be sure to also update the return value of
|
||||
/// [`TaskSourceName::all`].
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, JSTraceable, MallocSizeOf, PartialEq)]
|
||||
pub enum TaskSourceName {
|
||||
pub(crate) enum TaskSourceName {
|
||||
DOMManipulation,
|
||||
FileReading,
|
||||
HistoryTraversal,
|
||||
|
@ -64,7 +64,7 @@ impl From<TaskSourceName> for ScriptThreadEventCategory {
|
|||
}
|
||||
|
||||
impl TaskSourceName {
|
||||
pub fn all() -> &'static [TaskSourceName] {
|
||||
pub(crate) fn all() -> &'static [TaskSourceName] {
|
||||
&[
|
||||
TaskSourceName::DOMManipulation,
|
||||
TaskSourceName::FileReading,
|
||||
|
@ -84,8 +84,8 @@ impl TaskSourceName {
|
|||
}
|
||||
|
||||
pub(crate) struct TaskSource<'task_manager> {
|
||||
pub task_manager: &'task_manager TaskManager,
|
||||
pub name: TaskSourceName,
|
||||
pub(crate) task_manager: &'task_manager TaskManager,
|
||||
pub(crate) name: TaskSourceName,
|
||||
}
|
||||
|
||||
impl TaskSource<'_> {
|
||||
|
@ -160,11 +160,11 @@ impl<'task_manager> From<TaskSource<'task_manager>> for SendableTaskSource {
|
|||
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
pub(crate) struct SendableTaskSource {
|
||||
pub sender: ScriptEventLoopSender,
|
||||
pub(crate) sender: ScriptEventLoopSender,
|
||||
#[no_trace]
|
||||
pub pipeline_id: PipelineId,
|
||||
pub name: TaskSourceName,
|
||||
pub canceller: TaskCanceller,
|
||||
pub(crate) pipeline_id: PipelineId,
|
||||
pub(crate) name: TaskSourceName,
|
||||
pub(crate) canceller: TaskCanceller,
|
||||
}
|
||||
|
||||
impl SendableTaskSource {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue