From f789c026934550b04900c37c74edca36ff43fc7b Mon Sep 17 00:00:00 2001 From: komuhangi <51232461+jahielkomu@users.noreply.github.com> Date: Sun, 31 Mar 2024 20:03:53 +0300 Subject: [PATCH 1/2] Update shadow_root.rs (Ignore change) --- components/script/layout_dom/shadow_root.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/script/layout_dom/shadow_root.rs b/components/script/layout_dom/shadow_root.rs index 090d1e84f8b..de2da7a030f 100644 --- a/components/script/layout_dom/shadow_root.rs +++ b/components/script/layout_dom/shadow_root.rs @@ -70,7 +70,9 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoShadowRoot<'dom, LayoutDataType phantom: PhantomData, } } - + /// # Safety + /// + /// This function should not mutate StyleSharedRwLockReadGuard. pub unsafe fn flush_stylesheets( &self, stylist: &mut Stylist, From 67d6ac0d140680ba16821b6e9855ea3c6209e6bc Mon Sep 17 00:00:00 2001 From: komuhangi <51232461+jahielkomu@users.noreply.github.com> Date: Sun, 31 Mar 2024 20:05:55 +0300 Subject: [PATCH 2/2] Update node.rs (Ignore changes) --- components/script/layout_dom/node.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs index c780170bf74..6fb20bc13b3 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -97,7 +97,10 @@ 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)) }