mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 19:46:03 +00:00
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
This commit is contained in:
parent
b61eff8730
commit
5a4c90fcb1
Notes:
sideshowbarker
2024-07-18 03:54:00 +09:00
Author: https://github.com/IdanHo
Commit: 5a4c90fcb1
Pull-request: https://github.com/SerenityOS/serenity/pull/10048
Reviewed-by: https://github.com/linusg ✅
30 changed files with 38 additions and 93 deletions
|
@ -294,9 +294,7 @@ PlainDateTime* create_temporal_date_time(GlobalObject& global_object, i32 iso_ye
|
|||
// 15. Set object.[[ISOMicrosecond]] to microsecond.
|
||||
// 16. Set object.[[ISONanosecond]] to nanosecond.
|
||||
// 17. Set object.[[Calendar]] to calendar.
|
||||
auto* object = ordinary_create_from_constructor<PlainDateTime>(global_object, *new_target, &GlobalObject::temporal_plain_date_prototype, iso_year, iso_month, iso_day, hour, minute, second, millisecond, microsecond, nanosecond, calendar);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* object = TRY_OR_DISCARD(ordinary_create_from_constructor<PlainDateTime>(global_object, *new_target, &GlobalObject::temporal_plain_date_prototype, iso_year, iso_month, iso_day, hour, minute, second, millisecond, microsecond, nanosecond, calendar));
|
||||
|
||||
// 18. Return object.
|
||||
return object;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue