Merge branch 'upstream' into fix-future-on-dropped-scope

This commit is contained in:
Evan Almloff committed 2023-01-15 14:01:11 -06:00
commit d13d1fb1c9
3 files changed
+48 -17

No files matched your search

+7 -2
View File
@@ -1,8 +1,8 @@
use std::ptr::NonNull;
use crate::{
nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, AttributeValue, DynamicNode,
ScopeId,
innerlude::DirtyScope, nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom,
AttributeValue, DynamicNode, ScopeId,
};
use bumpalo::boxed::Box as BumpBox;
@@ -89,6 +89,11 @@ impl VirtualDom {
// Drop a scope and all its children
pub(crate) fn drop_scope(&mut self, id: ScopeId) {
self.dirty_scopes.remove(&DirtyScope {
height: self.scopes[id.0].height,
id,
});
self.ensure_drop_safety(id);
if let Some(root) = self.scopes[id.0].as_ref().try_root_node() {