From bc4a0baa8fc7094bf5645fc9cf2d4e4bebf7c4eb Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 29 Apr 2022 19:50:41 +0200 Subject: [PATCH] LibJS: Remove outdated FIXMEs about required date_from_fields() options The `options` parameter is no longer required by the function, so we can stop passing in options as well where not required by the spec. --- .../Runtime/Temporal/PlainYearMonthPrototype.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp index c9272b5571..6817b93523 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp @@ -447,8 +447,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::until) MUST(other_fields->create_data_property_or_throw(vm.names.day, Value(1))); // 16. Let otherDate be ? DateFromFields(calendar, otherFields). - // FIXME: Spec doesn't pass required options, see https://github.com/tc39/proposal-temporal/issues/1685. - auto* other_date = TRY(date_from_fields(global_object, calendar, *other_fields, options)); + auto* other_date = TRY(date_from_fields(global_object, calendar, *other_fields)); // 17. Let thisFields be ? PrepareTemporalFields(yearMonth, fieldNames, «»). auto* this_fields = TRY(prepare_temporal_fields(global_object, *year_month, field_names, {})); @@ -457,8 +456,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::until) MUST(this_fields->create_data_property_or_throw(vm.names.day, Value(1))); // 19. Let thisDate be ? DateFromFields(calendar, thisFields). - // FIXME: Spec doesn't pass required options, see https://github.com/tc39/proposal-temporal/issues/1685. - auto* this_date = TRY(date_from_fields(global_object, calendar, *this_fields, options)); + auto* this_date = TRY(date_from_fields(global_object, calendar, *this_fields)); // 20. Let untilOptions be ? MergeLargestUnitOption(options, largestUnit). auto* until_options = TRY(merge_largest_unit_option(global_object, options, *largest_unit)); @@ -530,8 +528,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::since) MUST(other_fields->create_data_property_or_throw(vm.names.day, Value(1))); // 17. Let otherDate be ? DateFromFields(calendar, otherFields). - // FIXME: Spec doesn't pass required options, see https://github.com/tc39/proposal-temporal/issues/1685. - auto* other_date = TRY(date_from_fields(global_object, calendar, *other_fields, options)); + auto* other_date = TRY(date_from_fields(global_object, calendar, *other_fields)); // 18. Let thisFields be ? PrepareTemporalFields(yearMonth, fieldNames, «»). auto* this_fields = TRY(prepare_temporal_fields(global_object, *year_month, field_names, {})); @@ -540,8 +537,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::since) MUST(this_fields->create_data_property_or_throw(vm.names.day, Value(1))); // 20. Let thisDate be ? DateFromFields(calendar, thisFields). - // FIXME: Spec doesn't pass required options, see https://github.com/tc39/proposal-temporal/issues/1685. - auto* this_date = TRY(date_from_fields(global_object, calendar, *this_fields, options)); + auto* this_date = TRY(date_from_fields(global_object, calendar, *this_fields)); // 21. Let untilOptions be ? MergeLargestUnitOption(options, largestUnit). auto* until_options = TRY(merge_largest_unit_option(global_object, options, *largest_unit));