feat: ArrayBuffer 三访问器与 markImmutable 及 detach 宿主真化

This commit is contained in:
2026-09-22 23:30:18 +00:00
parent ced1a2e43e
commit 7d7a195014
7 changed files with 392 additions and 25 deletions
+5 -3
View File
@@ -57,9 +57,11 @@ pub fn eval_script(vm: &mut Vm, args: &[u8]) -> NativeResult {
}
}
/// `$262.detachArrayBuffer(buf)`:ArrayBuffer detach 未实现,抛能力缺失错误。
pub fn detach_array_buffer(vm: &mut Vm, _args: &[u8]) -> NativeResult {
not_supported(vm, "detachArrayBuffer")
/// `$262.detachArrayBuffer(buf)`:真 detach——品牌守卫后载荷 `data → None`,
/// 返回 undefined。
pub fn detach_array_buffer(vm: &mut Vm, args: &[u8]) -> NativeResult {
let this_val = if args.len() > 1 { vm.reg(args[1]) } else { JsValue::undefined() };
oxide_builtins::array_buffer::detach_array_buffer_native::<Vm>(vm, this_val)
}
/// `$262.createRealm()`:跨 realm 未支持,抛能力缺失错误。