1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibJS: Mark AO calls creating a copy of built-in objects as infallible

This is an editorial change in the Temporal spec.

See: 536f067
This commit is contained in:
Linus Groh 2022-06-14 23:58:25 +01:00
parent be2c86002a
commit fafc9b07c4
6 changed files with 12 additions and 12 deletions

View file

@ -86,8 +86,8 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from)
// a. Perform ? ToTemporalOverflow(options).
(void)TRY(to_temporal_overflow(global_object, options));
// b. Return ? CreateTemporalDate(item.[[ISOYear]], item.[[ISOMonth]], item.[[ISODay]], item.[[Calendar]]).
return TRY(create_temporal_date(global_object, plain_date_item.iso_year(), plain_date_item.iso_month(), plain_date_item.iso_day(), plain_date_item.calendar()));
// b. Return ! CreateTemporalDate(item.[[ISOYear]], item.[[ISOMonth]], item.[[ISODay]], item.[[Calendar]]).
return MUST(create_temporal_date(global_object, plain_date_item.iso_year(), plain_date_item.iso_month(), plain_date_item.iso_day(), plain_date_item.calendar()));
}
// 3. Return ? ToTemporalDate(item, options).