1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibJS: Convert to_temporal_overflow() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-15 23:39:42 +01:00
parent b1e7e62657
commit 9f03647f1f
13 changed files with 26 additions and 53 deletions

View file

@ -71,9 +71,7 @@ ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_o
}
// 4. Perform ? ToTemporalOverflow(options).
(void)to_temporal_overflow(global_object, *options);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
(void)TRY(to_temporal_overflow(global_object, *options));
// 5. Let string be ? ToString(item).
auto string = item.to_string(global_object);