Own asynchronous timer tasks in the managed object lifecycle
Verify Tessera GUI / verify (push) Failing after 7m26s

This commit is contained in:
2026-10-21 23:09:03 +08:00
parent 3a7b755532
commit 6d6a9b7a34
12 changed files with 958 additions and 19 deletions
+10 -2
View File
@@ -38,10 +38,11 @@ pub enum Kind {
/// The VM owns the Block -> Cell -> Data relationship. Shared assignment
/// changes the Cell to point at another Block, retaining the original identity.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Block {
pub state: ObjectRef,
pub page: bool,
pub tasks: Option<ObjectRef>,
}
impl ObjectPayload for Block {
@@ -88,6 +89,9 @@ impl ObjectPayload for Block {
}
fn trace(&self, visit: &mut dyn FnMut(ObjectRef)) {
visit(self.state);
if let Some(tasks) = self.tasks {
visit(tasks);
}
}
fn assignment_cell(
&self,
@@ -203,7 +207,11 @@ pub fn allocate(cx: &mut NativeContext<'_>, mut data: Data) -> Result<ObjectRef,
data.properties = Some(properties);
let data = cx.allocate(data)?;
let state = cx.new_cell(Some(Value::Object(data)))?;
cx.allocate(Block { state, page })
cx.allocate(Block {
state,
page,
tasks: None,
})
}
/// Borrowed final data; forwarding is part of the managed graph, never an Arc