mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-27 12:11:12 +08:00
refactor: 内置十四文件迁移内核访问器调用至能力方法
This commit is contained in:
@@ -38,7 +38,7 @@ pub fn eval<H: VmHost>(vm: &mut H, args: &[u8]) -> NativeResult {
|
||||
let code = oxide_kernel::string_forge::source_escape(&units);
|
||||
match vm.create_dynamic_script(&code) {
|
||||
Ok(func) => {
|
||||
let global = JsValue::from_js_object(vm.session().global_object().as_ptr() as *mut JsObject);
|
||||
let global = JsValue::from_js_object(vm.global_object().as_ptr() as *mut JsObject);
|
||||
match vm.call_function_sync(func, global, &[]) {
|
||||
Ok(val) => NativeResult::Ok(val),
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user