mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Make LayoutDocumentHelpers::style_shared_lock be safe
StyleSharedRwLock is Sync.
This commit is contained in:
parent
4636507fa1
commit
0c0027ecfd
3 changed files with 5 additions and 5 deletions
|
@ -368,7 +368,7 @@ impl<'ld> ServoLayoutDocument<'ld> {
|
|||
}
|
||||
|
||||
pub fn style_shared_lock(&self) -> &StyleSharedRwLock {
|
||||
unsafe { self.document.style_shared_lock() }
|
||||
self.document.style_shared_lock()
|
||||
}
|
||||
|
||||
pub fn shadow_roots(&self) -> Vec<ServoShadowRoot> {
|
||||
|
|
|
@ -375,7 +375,7 @@ impl<'ld> ServoLayoutDocument<'ld> {
|
|||
}
|
||||
|
||||
pub fn style_shared_lock(&self) -> &StyleSharedRwLock {
|
||||
unsafe { self.document.style_shared_lock() }
|
||||
self.document.style_shared_lock()
|
||||
}
|
||||
|
||||
pub fn shadow_roots(&self) -> Vec<ServoShadowRoot> {
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue