mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibJS: Convert Instant AOs to ThrowCompletionOr
This commit is contained in:
parent
ea7cc70118
commit
20337a34a2
Notes:
sideshowbarker
2024-07-18 03:47:33 +09:00
Author: https://github.com/linusg
Commit: 20337a34a2
Pull-request: https://github.com/SerenityOS/serenity/pull/10076
Reviewed-by: https://github.com/IdanHo ✅
11 changed files with 86 additions and 119 deletions
|
@ -154,7 +154,7 @@ PlainDateTime* to_temporal_date_time(GlobalObject& global_object, Value item, Ob
|
|||
auto& zoned_date_time = static_cast<ZonedDateTime&>(item_object);
|
||||
|
||||
// i. Let instant be ! CreateTemporalInstant(item.[[Nanoseconds]]).
|
||||
auto* instant = create_temporal_instant(global_object, zoned_date_time.nanoseconds());
|
||||
auto* instant = create_temporal_instant(global_object, zoned_date_time.nanoseconds()).release_value();
|
||||
|
||||
// ii. Return ? BuiltinTimeZoneGetPlainDateTimeFor(item.[[TimeZone]], instant, item.[[Calendar]]).
|
||||
return TRY_OR_DISCARD(builtin_time_zone_get_plain_date_time_for(global_object, &zoned_date_time.time_zone(), *instant, zoned_date_time.calendar()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue