mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
LibJS: Convert to_temporal_overflow() to ThrowCompletionOr
This commit is contained in:
parent
b1e7e62657
commit
9f03647f1f
Notes:
sideshowbarker
2024-07-18 03:49:26 +09:00
Author: https://github.com/linusg
Commit: 9f03647f1f
Pull-request: https://github.com/SerenityOS/serenity/pull/10065
Reviewed-by: https://github.com/IdanHo ✅
13 changed files with 26 additions and 53 deletions
|
@ -100,9 +100,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from)
|
|||
// 2. If Type(item) is Object and item has an [[InitializedTemporalYearMonth]] internal slot, then
|
||||
if (item.is_object() && is<PlainYearMonth>(item.as_object())) {
|
||||
// a. Perform ? ToTemporalOverflow(options).
|
||||
(void)to_temporal_overflow(global_object, *options);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
(void)TRY_OR_DISCARD(to_temporal_overflow(global_object, *options));
|
||||
|
||||
auto& plain_year_month_object = static_cast<PlainYearMonth&>(item.as_object());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue