fix: 修复 this 指针未绑定到寄存器问题

This commit is contained in:
爱特每羊队
2026-06-10 20:03:49 +08:00
parent 41d114bd5a
commit 263c8f29ed
+4
View File
@@ -1127,6 +1127,10 @@ impl Vm {
}
}
// Global execution context: `this` binds to the global object (ES5 §10.4.1).
let global_ptr = self.kernel.global_object().as_ptr() as *mut JsObject;
self.regs[254] = JsValue::from_js_object(global_ptr);
self.dispatch()
}