Eliminate to_shmem dependency from servo_url (#35897)

Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
Nico Burns 2025-03-11 13:33:39 +13:00 committed by GitHub
parent fd0e2125c6
commit 4611c8b0e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 0 additions and 12 deletions

View file

@ -17,6 +17,5 @@ malloc_size_of_derive = { workspace = true }
serde = { workspace = true, features = ["derive"] }
servo_arc = { workspace = true }
servo_rand = { path = "../rand" }
to_shmem = { workspace = true }
url = { workspace = true, features = ["serde"] }
uuid = { workspace = true, features = ["serde"] }

View file

@ -18,7 +18,6 @@ use std::path::Path;
use malloc_size_of_derive::MallocSizeOf;
use serde::{Deserialize, Serialize};
use servo_arc::Arc;
use to_shmem::{SharedMemoryBuilder, ToShmem};
pub use url::Host;
use url::{Position, Url};
@ -38,14 +37,6 @@ pub enum UrlError {
#[derive(Clone, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize)]
pub struct ServoUrl(#[ignore_malloc_size_of = "Arc"] Arc<Url>);
impl ToShmem for ServoUrl {
fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> to_shmem::Result<Self> {
unimplemented!(
"If servo wants to share stylesheets across processes, ToShmem for Url must be implemented"
)
}
}
impl ServoUrl {
pub fn from_url(url: Url) -> Self {
ServoUrl(Arc::new(url))