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

This commit is contained in:
2026-06-10 20:03:49 +08:00
parent 1f7f28a76f
commit 149b2ed7ce
+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() self.dispatch()
} }