mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 11:41:13 +08:00
refactor: 内置十四文件迁移内核访问器调用至能力方法
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Temporal.PlainTime:ISO 时间解析、构造、getter、with/until/since 与加减舍入。
|
||||
|
||||
use oxide_runtime_api::{to_number, to_string, NativeResult, VmHost};
|
||||
use oxide_runtime_api::{to_number, to_string, NativeResult, ProtoKind, VmHost};
|
||||
use oxide_types::object::JsObject;
|
||||
use oxide_types::value::JsValue;
|
||||
|
||||
@@ -272,7 +272,7 @@ pub(crate) fn valid_plain_time(hour: u32, minute: u32, second: u32, ms: u32, us:
|
||||
|
||||
/// `Temporal.PlainTime` 构造器:`new PlainTime(h, m, s, ms, us, ns)`,缺省为 0。
|
||||
pub fn plain_time_constructor<H: VmHost>(vm: &mut H, args: &[u8]) -> NativeResult {
|
||||
let ctor_proto = vm.session().builtin_world().plain_time_proto.as_ptr();
|
||||
let ctor_proto = vm.builtin_proto(ProtoKind::PlainTimeProto);
|
||||
if !is_ctor_call(vm, args, ctor_proto) {
|
||||
return NativeResult::Err(crate::error::create_type_error(
|
||||
vm,
|
||||
|
||||
Reference in New Issue
Block a user