diff options
-rw-r--r-- | components/net/resource_thread.rs | 18 | ||||
-rw-r--r-- | components/shared/net/pub_domains.rs | 8 | ||||
-rw-r--r-- | python/requirements.txt | 2 |
3 files changed, 21 insertions, 7 deletions
diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs index 4077256d6ca..89f76b3ca68 100644 --- a/components/net/resource_thread.rs +++ b/components/net/resource_thread.rs @@ -24,6 +24,7 @@ use log::{debug, trace, warn}; use malloc_size_of::MallocSizeOf; use net_traits::blob_url_store::parse_blob_url; use net_traits::filemanager_thread::FileTokenCheck; +use net_traits::pub_domains::public_suffix_list_size_of; use net_traits::request::{Destination, RequestBuilder, RequestId}; use net_traits::response::{Response, ResponseInit}; use net_traits::storage_thread::StorageThreadMsg; @@ -287,11 +288,18 @@ impl ResourceChannelManager { perform_memory_report(|ops| { let mut reports = public_http_state.memory_reports("public", ops); reports.extend(private_http_state.memory_reports("private", ops)); - reports.push(Report { - path: path!["hsts-preload-list"], - kind: ReportKind::ExplicitJemallocHeapSize, - size: hsts::PRELOAD_LIST_ENTRIES.size_of(ops), - }); + reports.extend(vec![ + Report { + path: path!["hsts-preload-list"], + kind: ReportKind::ExplicitJemallocHeapSize, + size: hsts::PRELOAD_LIST_ENTRIES.size_of(ops), + }, + Report { + path: path!["public-suffix-list"], + kind: ReportKind::ExplicitJemallocHeapSize, + size: public_suffix_list_size_of(ops), + }, + ]); msg.send(ProcessReports::new(reports)); }) } diff --git a/components/shared/net/pub_domains.rs b/components/shared/net/pub_domains.rs index cbbb2b465b2..6e6f883cd2f 100644 --- a/components/shared/net/pub_domains.rs +++ b/components/shared/net/pub_domains.rs @@ -19,9 +19,11 @@ use std::iter::FromIterator; use std::sync::LazyLock; use embedder_traits::resources::{self, Resource}; +use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; +use malloc_size_of_derive::MallocSizeOf; use servo_url::{Host, ImmutableOrigin, ServoUrl}; -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug, Default, MallocSizeOf)] pub struct PubDomainRules { rules: HashSet<String>, wildcards: HashSet<String>, @@ -30,6 +32,10 @@ pub struct PubDomainRules { static PUB_DOMAINS: LazyLock<PubDomainRules> = LazyLock::new(load_pub_domains); +pub fn public_suffix_list_size_of(ops: &mut MallocSizeOfOps) -> usize { + PUB_DOMAINS.size_of(ops) +} + impl<'a> FromIterator<&'a str> for PubDomainRules { fn from_iter<T>(iter: T) -> Self where diff --git a/python/requirements.txt b/python/requirements.txt index d026ce3ee5f..d64f33add3c 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -5,7 +5,7 @@ blessed == 1.20.0 distro == 1.4 mozinfo == 1.2.3 mozlog == 8.0.0 -setuptools == 70.0.0 +setuptools == 78.1.1 toml == 0.9.2 # For Python linting |