mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
fix: 接通透传闭包值链路
This commit is contained in:
@@ -226,9 +226,11 @@ impl Vm {
|
||||
let upvals = obj.upvalues_slice_mut();
|
||||
if uv_idx < upvals.len() {
|
||||
if !upvals[uv_idx].is_null() {
|
||||
unsafe { (*upvals[uv_idx]).value = src_val; }
|
||||
unsafe {
|
||||
(*upvals[uv_idx]).value = src_val;
|
||||
}
|
||||
vm_debug!("STORE_UPVALUE len={} wrote existing", upvals.len());
|
||||
} else {
|
||||
// Lazy create: cell was null (CREATE_CLOSURE before MAKE_CELL)
|
||||
let cell = self.gc_state.session_epoch.alloc(Cell::new(src_val, true));
|
||||
upvals[uv_idx] = cell as *mut Cell;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user