diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-03-18 00:47:08 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-03-19 22:30:37 +0100 |
commit | aeffca2a5900ebcf91063e9c7771b642817cb6bd (patch) | |
tree | 35a2a3513088fa303d96ed522d5c12eb29d6518c /components/layout/context.rs | |
parent | 57724e5a3755a757e502658094dfda171c78ba78 (diff) | |
download | servo-aeffca2a5900ebcf91063e9c7771b642817cb6bd.tar.gz servo-aeffca2a5900ebcf91063e9c7771b642817cb6bd.zip |
Replace RwLock<StyleRule> with Locked<StyleRule>
Diffstat (limited to 'components/layout/context.rs')
-rw-r--r-- | components/layout/context.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs index 1dff9f6ea5e..e2ffeb1cbd9 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -75,9 +75,9 @@ pub fn heap_size_of_persistent_local_context() -> usize { } /// Layout information shared among all workers. This must be thread-safe. -pub struct LayoutContext { +pub struct LayoutContext<'a> { /// Bits shared by the layout and style system. - pub style_context: SharedStyleContext, + pub style_context: SharedStyleContext<'a>, /// The shared image cache thread. pub image_cache_thread: Mutex<ImageCacheThread>, @@ -95,7 +95,7 @@ pub struct LayoutContext { pub pending_images: Option<Mutex<Vec<PendingImage>>> } -impl Drop for LayoutContext { +impl<'a> Drop for LayoutContext<'a> { fn drop(&mut self) { if !thread::panicking() { if let Some(ref pending_images) = self.pending_images { @@ -105,7 +105,7 @@ impl Drop for LayoutContext { } } -impl LayoutContext { +impl<'a> LayoutContext<'a> { #[inline(always)] pub fn shared_context(&self) -> &SharedStyleContext { &self.style_context |