fix: 补 Function 构造器残面与 TypedArray/Atomics 边

This commit is contained in:
2026-09-24 21:19:27 +00:00
parent 963c91ba75
commit 2dc119874d
8 changed files with 137 additions and 11 deletions
+5
View File
@@ -174,6 +174,11 @@ impl oxide_runtime_api::VmHost for Vm {
})
.collect()
}
fn function_is_strict(&self, obj: &JsObject) -> bool {
// native 函数(sub_module_index == 0)无子模块,callee_module 返回 None,
// 按严格处理(受限访问器对其抛错)。
self.callee_module(obj).map(|m| m.is_strict).unwrap_or(true)
}
fn promote_if_needed_for_write_ptr(&mut self, target_ptr: *mut JsObject, value: JsValue) -> JsValue {
self.promote_if_needed_for_write_ptr(target_ptr, value)
}