mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: 修复 this 指针未绑定到寄存器问题
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user