mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
docs: 改写虚拟机核心域注释并清除英文残留
- error.rs:补 coerce_primitive_bounded / coerce_number/int32/uint32_bounded / checked_object_ptr / raise_error_kind / raise_js_error / raise_type_error / error_message_text / thrown_error_kind 共 10 项文档;@@toPrimitive 英文块译中。 - dispatch_loop.rs:补 dispatch 主循环五段式文档。 - vmhost.rs:property_key_si trait 臂英文块译中(Reflect/Object 不传播键转换异常)。
This commit is contained in:
@@ -53,9 +53,9 @@ impl oxide_runtime_api::VmHost for Vm {
|
||||
self.last_uncaught_value = value;
|
||||
}
|
||||
fn property_key_si(&mut self, val: JsValue) -> u32 {
|
||||
// Object-key conversion (to_string_full) failures degrade to the empty key here:
|
||||
// this trait path is used by Reflect/Object builtins; computed property access
|
||||
// uses the inherent Result-returning version to preserve the full exception.
|
||||
// 对象键转换(to_string_full)失败时降级为空键:本 trait 路径供
|
||||
// Reflect/Object 内置使用,这些内置按规范不传播键转换异常;计算属性
|
||||
// 访问走返回 Result 的 inherent 版本,转换异常原样保留。
|
||||
self.property_key_si(val)
|
||||
.unwrap_or_else(|_| self.kernel_core.perm_interner().intern("").0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user