mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-20 09:21:55 +00:00
LibJS: Convert to_positive_integer() to ThrowCompletionOr
This commit is contained in:
parent
2f56fd48ca
commit
9ac426c906
Notes:
sideshowbarker
2024-07-18 03:48:16 +09:00
Author: https://github.com/linusg
Commit: 9ac426c906
Pull-request: https://github.com/SerenityOS/serenity/pull/10065
Reviewed-by: https://github.com/IdanHo ✅
3 changed files with 7 additions and 10 deletions
|
@ -157,7 +157,7 @@ double calendar_month(GlobalObject& global_object, Object& calendar, Object& dat
|
|||
}
|
||||
|
||||
// 4. Return ? ToPositiveInteger(result).
|
||||
return to_positive_integer(global_object, result);
|
||||
return TRY_OR_DISCARD(to_positive_integer(global_object, result));
|
||||
}
|
||||
|
||||
// 12.1.11 CalendarMonthCode ( calendar, dateLike ), https://tc39.es/proposal-temporal/#sec-temporal-calendarmonthcode
|
||||
|
@ -199,7 +199,7 @@ double calendar_day(GlobalObject& global_object, Object& calendar, Object& date_
|
|||
}
|
||||
|
||||
// 4. Return ? ToPositiveInteger(result).
|
||||
return to_positive_integer(global_object, result);
|
||||
return TRY_OR_DISCARD(to_positive_integer(global_object, result));
|
||||
}
|
||||
|
||||
// 12.1.13 CalendarDayOfWeek ( calendar, dateLike ), https://tc39.es/proposal-temporal/#sec-temporal-calendardayofweek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue