P0: user_defined factory safe init stub; P1: HTTPResponseBox interior mutability via Mutex (thread-safe), implement set_status/header/body/append_body + to_http_string, manual Clone; build green
This commit is contained in:
@ -38,14 +38,17 @@ impl BoxFactory for UserDefinedBoxFactory {
|
||||
})?;
|
||||
|
||||
// Create InstanceBox with fields and methods
|
||||
let instance = InstanceBox::from_declaration(
|
||||
let mut instance = InstanceBox::from_declaration(
|
||||
name.to_string(),
|
||||
box_decl.fields.clone(),
|
||||
box_decl.methods.clone(),
|
||||
);
|
||||
|
||||
// TODO: Execute birth/init constructor with args
|
||||
// For now, just return the instance
|
||||
// Safe stub: run minimal init hook (no-op for now).
|
||||
// - Does not execute user birth/init AST yet (interpreter-owned).
|
||||
// - Avoids panics; ignores errors to keep factory safe.
|
||||
let _ = instance.init(_args);
|
||||
|
||||
Ok(Box::new(instance))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user