aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/net
diff options
context:
space:
mode:
Diffstat (limited to 'components/shared/net')
-rw-r--r--components/shared/net/filemanager_thread.rs2
-rw-r--r--components/shared/net/image_cache.rs6
2 files changed, 7 insertions, 1 deletions
diff --git a/components/shared/net/filemanager_thread.rs b/components/shared/net/filemanager_thread.rs
index e55fbefcefc..0e9014e1670 100644
--- a/components/shared/net/filemanager_thread.rs
+++ b/components/shared/net/filemanager_thread.rs
@@ -39,7 +39,7 @@ pub enum FileTokenCheck {
/// Relative slice positions of a sequence,
/// whose semantic should be consistent with (start, end) parameters in
/// <https://w3c.github.io/FileAPI/#dfn-slice>
-#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)]
pub struct RelativePos {
/// Relative to first byte if non-negative,
/// relative to one past last byte if negative,
diff --git a/components/shared/net/image_cache.rs b/components/shared/net/image_cache.rs
index 8fb329d304f..3f316388755 100644
--- a/components/shared/net/image_cache.rs
+++ b/components/shared/net/image_cache.rs
@@ -141,4 +141,10 @@ pub trait ImageCache: Sync + Send {
/// Inform the image cache about a response for a pending request.
fn notify_pending_response(&self, id: PendingImageId, action: FetchResponseMsg);
+
+ /// Create new image cache based on this one, while reusing the existing thread_pool.
+ fn create_new_image_cache(
+ &self,
+ compositor_api: CrossProcessCompositorApi,
+ ) -> Arc<dyn ImageCache>;
}