mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibJS: Remove a bunch of forgotten exception checks after TRY_OR_DISCARD
Not quite sure how that happened :^)
This commit is contained in:
parent
64aaf263a2
commit
ffee3890a7
9 changed files with 0 additions and 18 deletions
|
@ -127,8 +127,6 @@ JS_DEFINE_NATIVE_FUNCTION(DisplayNamesConstructor::supported_locales_of)
|
|||
|
||||
// 2. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 3. Return ? SupportedLocales(availableLocales, requestedLocales, options).
|
||||
return TRY_OR_DISCARD(supported_locales(global_object, requested_locales, options));
|
||||
|
|
|
@ -106,8 +106,6 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatConstructor::supported_locales_of)
|
|||
|
||||
// 2. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 3. Return ? SupportedLocales(availableLocales, requestedLocales, options).
|
||||
return TRY_OR_DISCARD(supported_locales(global_object, requested_locales, options));
|
||||
|
|
|
@ -74,8 +74,6 @@ JS_DEFINE_NATIVE_FUNCTION(NumberFormatConstructor::supported_locales_of)
|
|||
|
||||
// 2. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 3. Return ? SupportedLocales(availableLocales, requestedLocales, options).
|
||||
return TRY_OR_DISCARD(supported_locales(global_object, requested_locales, options));
|
||||
|
|
|
@ -141,8 +141,6 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::add)
|
|||
|
||||
// 4. Let ns be ? AddInstant(instant.[[Nanoseconds]], duration.[[Hours]], duration.[[Minutes]], duration.[[Seconds]], duration.[[Milliseconds]], duration.[[Microseconds]], duration.[[Nanoseconds]]).
|
||||
auto* ns = TRY_OR_DISCARD(add_instant(global_object, instant->nanoseconds(), duration.hours, duration.minutes, duration.seconds, duration.milliseconds, duration.microseconds, duration.nanoseconds));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 5. Return ! CreateTemporalInstant(ns).
|
||||
return MUST(create_temporal_instant(global_object, *ns));
|
||||
|
|
|
@ -432,8 +432,6 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar)
|
|||
|
||||
// 3. Let calendar be ? ToTemporalCalendar(calendar).
|
||||
auto* calendar = TRY_OR_DISCARD(to_temporal_calendar(global_object, vm.argument(0)));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 4. Return ? CreateTemporalDateTime(dateTime.[[ISOYear]], dateTime.[[ISOMonth]], dateTime.[[ISODay]], dateTime.[[ISOHour]], dateTime.[[ISOMinute]], dateTime.[[ISOSecond]], dateTime.[[ISOMillisecond]], dateTime.[[ISOMicrosecond]], dateTime.[[ISONanosecond]], calendar).
|
||||
return TRY_OR_DISCARD(create_temporal_date_time(global_object, date_time->iso_year(), date_time->iso_month(), date_time->iso_day(), date_time->iso_hour(), date_time->iso_minute(), date_time->iso_second(), date_time->iso_millisecond(), date_time->iso_microsecond(), date_time->iso_nanosecond(), *calendar));
|
||||
|
|
|
@ -192,8 +192,6 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date)
|
|||
|
||||
// 5. Let receiverFieldNames be ? CalendarFields(calendar, « "day", "monthCode" »).
|
||||
auto receiver_field_names = TRY_OR_DISCARD(calendar_fields(global_object, calendar, { "day"sv, "monthCode"sv }));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 6. Let fields be ? PrepareTemporalFields(monthDay, receiverFieldNames, «»).
|
||||
auto* fields = TRY_OR_DISCARD(prepare_temporal_fields(global_object, *month_day, receiver_field_names, {}));
|
||||
|
|
|
@ -245,8 +245,6 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string)
|
|||
|
||||
// 3. Set options to ? GetOptionsObject(options).
|
||||
auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(0)));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 4. Let showCalendar be ? ToShowCalendarOption(options).
|
||||
auto show_calendar = TRY_OR_DISCARD(to_show_calendar_option(global_object, *options));
|
||||
|
|
|
@ -849,8 +849,6 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day)
|
|||
|
||||
// 7. Let fieldNames be ? CalendarFields(calendar, « "day", "monthCode" »).
|
||||
auto field_names = TRY_OR_DISCARD(calendar_fields(global_object, calendar, { "day"sv, "monthCode"sv }));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
// 8. Let fields be ? PrepareTemporalFields(temporalDateTime, fieldNames, «»).
|
||||
auto* fields = TRY_OR_DISCARD(prepare_temporal_fields(global_object, *temporal_date_time, field_names, {}));
|
||||
|
|
|
@ -48,8 +48,6 @@ Value WeakSetConstructor::construct(FunctionObject& new_target)
|
|||
auto& global_object = this->global_object();
|
||||
|
||||
auto* weak_set = TRY_OR_DISCARD(ordinary_create_from_constructor<WeakSet>(global_object, new_target, &GlobalObject::weak_set_prototype));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
if (vm.argument(0).is_nullish())
|
||||
return weak_set;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue