diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 0dd190ef2f1..efb18a8d285 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -2520,7 +2520,6 @@ impl Window { impl Window { #[allow(unsafe_code)] - #[allow(clippy::too_many_arguments)] pub fn new( runtime: Rc, script_chan: MainThreadScriptChan, diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs index c331f4aa5e3..2b30f678a09 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -97,7 +97,9 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType phantom: PhantomData, } } - + /// # Safety + /// + /// This function should not be called if there is no TrustedNodeAddress. pub unsafe fn new(address: &TrustedNodeAddress) -> Self { ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address)) } diff --git a/components/script/layout_dom/shadow_root.rs b/components/script/layout_dom/shadow_root.rs index 090d1e84f8b..3da0e2cc537 100644 --- a/components/script/layout_dom/shadow_root.rs +++ b/components/script/layout_dom/shadow_root.rs @@ -71,6 +71,9 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoShadowRoot<'dom, LayoutDataType } } + /// # Safety + /// + /// This function should not mutate StyleSharedRwLockReadGuard. pub unsafe fn flush_stylesheets( &self, stylist: &mut Stylist,