mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 01:04:38 +03:00
LibJS: Make to_temporal_time_record() time like Object a const&
This only calls Object::get() on the temporal_time_like Object, which is const-qualified.
This commit is contained in:
parent
77a18392ff
commit
c9951ad26b
Notes:
sideshowbarker
2024-07-18 04:21:19 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/c9951ad26b7 Pull-request: https://github.com/SerenityOS/serenity/pull/9918 Reviewed-by: https://github.com/IdanHo ✅
@ -374,7 +374,7 @@ PlainTime* create_temporal_time(GlobalObject& global_object, u8 hour, u8 minute,
|
||||
}
|
||||
|
||||
// 4.5.9 ToTemporalTimeRecord ( temporalTimeLike ), https://tc39.es/proposal-temporal/#sec-temporal-totemporaltimerecord
|
||||
Optional<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject& global_object, Object& temporal_time_like)
|
||||
Optional<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject& global_object, Object const& temporal_time_like)
|
||||
{
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
|
@ -97,7 +97,7 @@ bool is_valid_time(double hour, double minute, double second, double millisecond
|
||||
DaysAndTime balance_time(i64 hour, i64 minute, i64 second, i64 millisecond, i64 microsecond, i64 nanosecond);
|
||||
TemporalTime constrain_time(double hour, double minute, double second, double millisecond, double microsecond, double nanosecond);
|
||||
PlainTime* create_temporal_time(GlobalObject&, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, FunctionObject const* new_target = nullptr);
|
||||
Optional<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject&, Object& temporal_time_like);
|
||||
Optional<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject&, Object const& temporal_time_like);
|
||||
String temporal_time_to_string(u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, Variant<StringView, u8> const& precision);
|
||||
i8 compare_temporal_time(u8 hour1, u8 minute1, u8 second1, u16 millisecond1, u16 microsecond1, u16 nanosecond1, u8 hour2, u8 minute2, u8 second2, u16 millisecond2, u16 microsecond2, u16 nanosecond2);
|
||||
DaysAndTime round_time(GlobalObject&, u8 hour, u8 minute, u8 second, u16 millisecond, u16 microsecond, u16 nanosecond, u64 increment, StringView unit, StringView rounding_mode, Optional<double> day_length_ns = {});
|
||||
|
Loading…
Reference in New Issue
Block a user