diff options
author | Anthony Ramine <nox@nox.paris> | 2020-04-01 00:22:22 +0200 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-04-01 11:40:55 +0200 |
commit | 0c0027ecfdf380f6813d03a270428b62d42434e5 (patch) | |
tree | 82ee78e0d9ffdec24345321990f9ede0e63d3f08 /components/script/dom/document.rs | |
parent | 4636507fa1f218d4c0d858089946b3e6f9b9aabc (diff) | |
download | servo-0c0027ecfdf380f6813d03a270428b62d42434e5.tar.gz servo-0c0027ecfdf380f6813d03a270428b62d42434e5.zip |
Make LayoutDocumentHelpers::style_shared_lock be safe
StyleSharedRwLock is Sync.
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index c3c64babfef..afaf0a5292b 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -2610,7 +2610,7 @@ pub trait LayoutDocumentHelpers<'dom> { unsafe fn needs_paint_from_layout(self); unsafe fn will_paint(self); fn quirks_mode(self) -> QuirksMode; - unsafe fn style_shared_lock(self) -> &'dom StyleSharedRwLock; + fn style_shared_lock(self) -> &'dom StyleSharedRwLock; fn shadow_roots(self) -> Vec<LayoutDom<'dom, ShadowRoot>>; fn shadow_roots_styles_changed(self) -> bool; unsafe fn flush_shadow_roots_stylesheets(self); @@ -2639,8 +2639,8 @@ impl<'dom> LayoutDocumentHelpers<'dom> for LayoutDom<'dom, Document> { } #[inline] - unsafe fn style_shared_lock(self) -> &'dom StyleSharedRwLock { - (*self.unsafe_get()).style_shared_lock() + fn style_shared_lock(self) -> &'dom StyleSharedRwLock { + unsafe { self.unsafe_get().style_shared_lock() } } #[inline] |