diff options
Diffstat (limited to 'Userland/Libraries/LibJS')
21 files changed, 78 insertions, 78 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index a36598cdea..341108a138 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -84,7 +84,7 @@ ThrowCompletionOr<Object*> get_options_object(GlobalObject& global_object, Value // 1. If options is undefined, then if (options.is_undefined()) { - // a. Return ! OrdinaryObjectCreate(null). + // a. Return OrdinaryObjectCreate(null). return Object::create(global_object, nullptr); } @@ -129,7 +129,7 @@ ThrowCompletionOr<Value> get_option(GlobalObject& global_object, Object const& o // 7. If type is Boolean, then if (type == OptionType::Boolean) { - // a. Set value to ! ToBoolean(value). + // a. Set value to ToBoolean(value). value = Value(value.to_boolean()); } // 8. Else if type is Number, then @@ -617,7 +617,7 @@ ThrowCompletionOr<Value> to_relative_temporal_object(GlobalObject& global_object // e. Let fields be ? PrepareTemporalFields(value, fieldNames, «»). auto* fields = TRY(prepare_temporal_fields(global_object, value_object, field_names, {})); - // f. Let dateOptions be ! OrdinaryObjectCreate(null). + // f. Let dateOptions be OrdinaryObjectCreate(null). auto* date_options = Object::create(global_object, nullptr); // g. Perform ! CreateDataPropertyOrThrow(dateOptions, "overflow", "constrain"). @@ -666,7 +666,7 @@ ThrowCompletionOr<Value> to_relative_temporal_object(GlobalObject& global_object // f. If timeZoneName is not undefined, then if (time_zone_name.has_value()) { - // i. If ParseText(! StringToCodePoints(timeZoneName), TimeZoneNumericUTCOffset) is not a List of errors, then + // i. If ParseText(StringToCodePoints(timeZoneName), TimeZoneNumericUTCOffset) is not a List of errors, then // FIXME: Logic error in the spec (check for no errors -> check for errors). // See: https://github.com/tc39/proposal-temporal/pull/2000 if (!is_valid_time_zone_numeric_utc_offset_syntax(*time_zone_name)) { @@ -828,7 +828,7 @@ ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject& global_object { auto& vm = global_object.vm(); - // 1. Let merged be ! OrdinaryObjectCreate(%Object.prototype%). + // 1. Let merged be OrdinaryObjectCreate(%Object.prototype%). auto* merged = Object::create(global_object, global_object.object_prototype()); // 2. Let keys be ? EnumerableOwnPropertyNames(options, key). @@ -1113,7 +1113,7 @@ ThrowCompletionOr<ISODateTime> parse_iso_date_time(GlobalObject& global_object, else normalized_year = year_part.value_or("0"); - // 7. If ! SameValue(year, "-000000") is true, throw a RangeError exception. + // 7. If SameValue(year, "-000000") is true, throw a RangeError exception. if (normalized_year == "-000000"sv) return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidExtendedYearNegativeZero); @@ -1345,7 +1345,7 @@ ThrowCompletionOr<DurationRecord> parse_temporal_duration_string(GlobalObject& g // 1. Assert: Type(isoString) is String. - // 2. Let duration be ParseText(! StringToCodePoints(isoString), TemporalDurationString). + // 2. Let duration be ParseText(StringToCodePoints(isoString), TemporalDurationString). auto parse_result = parse_iso8601(Production::TemporalDurationString, iso_string); // 3. If duration is a List of errors, throw a RangeError exception. @@ -1390,7 +1390,7 @@ ThrowCompletionOr<DurationRecord> parse_temporal_duration_string(GlobalObject& g if (minutes_part.has_value() || f_minutes_part.has_value() || seconds_part.has_value() || f_seconds_part.has_value()) return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidDurationStringFractionNotLast, iso_string, "hours"sv, "minutes or seconds"sv); - // b. Let fHoursDigits be the substring of ! CodePointsToString(fHours) from 1. + // b. Let fHoursDigits be the substring of CodePointsToString(fHours) from 1. auto f_hours_digits = f_hours_part->substring_view(1); // c. Let fHoursScale be the length of fHoursDigits. @@ -1413,7 +1413,7 @@ ThrowCompletionOr<DurationRecord> parse_temporal_duration_string(GlobalObject& g if (seconds_part.has_value() || f_seconds_part.has_value()) return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidDurationStringFractionNotLast, iso_string, "minutes"sv, "seconds"sv); - // b. Let fMinutesDigits be the substring of ! CodePointsToString(fMinutes) from 1. + // b. Let fMinutesDigits be the substring of CodePointsToString(fMinutes) from 1. auto f_minutes_digits = f_minutes_part->substring_view(1); // c. Let fMinutesScale be the length of fMinutesDigits. @@ -1437,7 +1437,7 @@ ThrowCompletionOr<DurationRecord> parse_temporal_duration_string(GlobalObject& g // 15. If fSeconds is not empty, then if (f_seconds_part.has_value()) { - // a. Let fSecondsDigits be the substring of ! CodePointsToString(fSeconds) from 1. + // a. Let fSecondsDigits be the substring of CodePointsToString(fSeconds) from 1. auto f_seconds_digits = f_seconds_part->substring_view(1); // b. Let fSecondsScale be the length of fSecondsDigits. @@ -1588,9 +1588,9 @@ ThrowCompletionOr<TemporalTime> parse_temporal_time_string(GlobalObject& global_ // 4. Let result be ? ParseISODateTime(isoString). auto result = TRY(parse_iso_date_time(global_object, *parse_result)); - // 5. Assert: ParseText(! StringToCodePoints(isoString), CalendarDate) is a List of errors. - // 6. Assert: ParseText(! StringToCodePoints(isoString), DateSpecYearMonth) is a List of errors. - // 7. Assert: ParseText(! StringToCodePoints(isoString), DateSpecMonthDay) is a List of errors. + // 5. Assert: ParseText(StringToCodePoints(isoString), CalendarDate) is a List of errors. + // 6. Assert: ParseText(StringToCodePoints(isoString), DateSpecYearMonth) is a List of errors. + // 7. Assert: ParseText(StringToCodePoints(isoString), DateSpecMonthDay) is a List of errors. // 8. Return the Record { [[Hour]]: result.[[Hour]], [[Minute]]: result.[[Minute]], [[Second]]: result.[[Second]], [[Millisecond]]: result.[[Millisecond]], [[Microsecond]]: result.[[Microsecond]], [[Nanosecond]]: result.[[Nanosecond]], [[Calendar]]: result.[[Calendar]] }. return TemporalTime { .hour = result.hour, .minute = result.minute, .second = result.second, .millisecond = result.millisecond, .microsecond = result.microsecond, .nanosecond = result.nanosecond, .calendar = move(result.calendar) }; @@ -1603,7 +1603,7 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject // 1. Assert: Type(isoString) is String. - // 2. Let parseResult be ParseText(! StringToCodePoints(isoString), TemporalTimeZoneString). + // 2. Let parseResult be ParseText(StringToCodePoints(isoString), TemporalTimeZoneString). auto parse_result = parse_iso8601(Production::TemporalTimeZoneString, iso_string); // 3. If parseResult is a List of errors, then @@ -1620,7 +1620,7 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject // 5. If name is empty, then // a. Set name to undefined. // 6. Else, - // a. Set name to ! CodePointsToString(name). + // a. Set name to CodePointsToString(name). // NOTE: No-op. // 7. If z is not empty, then @@ -1632,7 +1632,7 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject // 8. If offsetString is empty, then // a. Set offsetString to undefined. // 9. Else, - // a. Set offsetString to ! CodePointsToString(offsetString). + // a. Set offsetString to CodePointsToString(offsetString). // NOTE: No-op. // 10. Return the Record { [[Z]]: false, [[OffsetString]]: offsetString, [[Name]]: name }. @@ -1691,7 +1691,7 @@ ThrowCompletionOr<Object*> prepare_temporal_fields(GlobalObject& global_object, // 1. Assert: Type(fields) is Object. - // 2. Let result be ! OrdinaryObjectCreate(%Object.prototype%). + // 2. Let result be OrdinaryObjectCreate(%Object.prototype%). auto* result = Object::create(global_object, global_object.object_prototype()); VERIFY(result); @@ -1742,7 +1742,7 @@ ThrowCompletionOr<Object*> prepare_partial_temporal_fields(GlobalObject& global_ // 1. Assert: Type(fields) is Object. - // 2. Let result be ! OrdinaryObjectCreate(%Object.prototype%). + // 2. Let result be OrdinaryObjectCreate(%Object.prototype%). auto* result = Object::create(global_object, global_object.object_prototype()); // 3. Let any be false. diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h index 0da3a47421..c1be037327 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h @@ -176,7 +176,7 @@ ThrowCompletionOr<double> to_integer_without_rounding(GlobalObject& global_objec if (number.is_nan() || number.is_positive_zero() || number.is_negative_zero()) return 0; - // 3. If ! IsIntegralNumber(number) is false, throw a RangeError exception. + // 3. If IsIntegralNumber(number) is false, throw a RangeError exception. if (!number.is_integral_number()) return vm.template throw_completion<RangeError>(global_object, error_type, args...); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp index 67fe9e53c0..4920a16109 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> - * Copyright (c) 2021, Linus Groh <linusg@serenityos.org> + * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -88,7 +88,7 @@ ThrowCompletionOr<Vector<String>> calendar_fields(GlobalObject& global_object, O // 1. Let fields be ? GetMethod(calendar, "fields"). auto fields = TRY(Value(&calendar).get_method(global_object, vm.names.fields)); - // 2. Let fieldsArray be ! CreateArrayFromList(fieldNames). + // 2. Let fieldsArray be CreateArrayFromList(fieldNames). auto field_names_values = MarkedVector<Value> { vm.heap() }; for (auto& field_name : field_names) field_names_values.append(js_string(vm, field_name)); @@ -774,7 +774,7 @@ ThrowCompletionOr<double> resolve_iso_month(GlobalObject& global_object, Object return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidMonthCode); } - // 11. If ! SameValueNonNumeric(monthCode, ! BuildISOMonthCode(numberPart)) is false, then + // 11. If SameValueNonNumeric(monthCode, ! BuildISOMonthCode(numberPart)) is false, then if (month_code_string != build_iso_month_code(number_part_integer)) { // a. Throw a RangeError exception. return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidMonthCode); @@ -983,7 +983,7 @@ ThrowCompletionOr<Object*> default_merge_fields(GlobalObject& global_object, Obj { auto& vm = global_object.vm(); - // 1. Let merged be ! OrdinaryObjectCreate(%Object.prototype%). + // 1. Let merged be OrdinaryObjectCreate(%Object.prototype%). auto* merged = Object::create(global_object, global_object.object_prototype()); // 2. Let originalKeys be ? EnumerableOwnPropertyNames(fields, key). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp index 3b3bbf8f96..05f5fa47d9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp @@ -535,7 +535,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields) field_names.append(next_value); } - // 8. Return ! CreateArrayFromList(fieldNames). + // 8. Return CreateArrayFromList(fieldNames). return Array::create_from(global_object, field_names); } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp index bb672a2117..1c38778269 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp @@ -630,13 +630,13 @@ ThrowCompletionOr<DateDurationRecord> unbalance_duration_relative(GlobalObject& // d. Repeat, while years ≠ 0, while (years != 0) { - // i. Let addOptions be ! OrdinaryObjectCreate(null). + // i. Let addOptions be OrdinaryObjectCreate(null). auto* add_options = Object::create(global_object, nullptr); // ii. Let newRelativeTo be ? CalendarDateAdd(calendar, relativeTo, oneYear, addOptions, dateAdd). auto* new_relative_to = TRY(calendar_date_add(global_object, *calendar, relative_to, *one_year, add_options, date_add)); - // iii. Let untilOptions be ! OrdinaryObjectCreate(null). + // iii. Let untilOptions be OrdinaryObjectCreate(null). auto* until_options = Object::create(global_object, nullptr); // iv. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). @@ -851,7 +851,7 @@ ThrowCompletionOr<DateDurationRecord> balance_duration_relative(GlobalObject& gl // i. Let dateAdd be ? GetMethod(calendar, "dateAdd"). auto* date_add = TRY(Value(&calendar).get_method(global_object, vm.names.dateAdd)); - // j. Let addOptions be ! OrdinaryObjectCreate(null). + // j. Let addOptions be OrdinaryObjectCreate(null). auto* add_options = Object::create(global_object, nullptr); // k. Let newRelativeTo be ? CalendarDateAdd(calendar, relativeTo, oneYear, addOptions, dateAdd). @@ -860,7 +860,7 @@ ThrowCompletionOr<DateDurationRecord> balance_duration_relative(GlobalObject& gl // l. Let dateUntil be ? GetMethod(calendar, "dateUntil"). auto* date_until = TRY(Value(&calendar).get_method(global_object, vm.names.dateUntil)); - // m. Let untilOptions be ! OrdinaryObjectCreate(null). + // m. Let untilOptions be OrdinaryObjectCreate(null). auto* until_options = Object::create(global_object, nullptr); // n. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). @@ -883,13 +883,13 @@ ThrowCompletionOr<DateDurationRecord> balance_duration_relative(GlobalObject& gl // iii. Set relativeTo to newRelativeTo. relative_to = new_relative_to; - // iv. Set addOptions to ! OrdinaryObjectCreate(null). + // iv. Set addOptions to OrdinaryObjectCreate(null). add_options = Object::create(global_object, nullptr); // v. Set newRelativeTo to ? CalendarDateAdd(calendar, relativeTo, oneYear, addOptions, dateAdd). new_relative_to = TRY(calendar_date_add(global_object, calendar, relative_to, *one_year, add_options, date_add)); - // vi. Set untilOptions to ! OrdinaryObjectCreate(null). + // vi. Set untilOptions to OrdinaryObjectCreate(null). until_options = Object::create(global_object, nullptr); // vii. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). @@ -1017,13 +1017,13 @@ ThrowCompletionOr<DurationRecord> add_duration(GlobalObject& global_object, doub // d. Let dateAdd be ? GetMethod(calendar, "dateAdd"). auto* date_add = TRY(Value(&calendar).get_method(global_object, vm.names.dateAdd)); - // e. Let firstAddOptions be ! OrdinaryObjectCreate(null). + // e. Let firstAddOptions be OrdinaryObjectCreate(null). auto* first_add_options = Object::create(global_object, nullptr); // f. Let intermediate be ? CalendarDateAdd(calendar, relativeTo, dateDuration1, firstAddOptions, dateAdd). auto* intermediate = TRY(calendar_date_add(global_object, calendar, &relative_to, *date_duration1, first_add_options, date_add)); - // g. Let secondAddOptions be ! OrdinaryObjectCreate(null). + // g. Let secondAddOptions be OrdinaryObjectCreate(null). auto* second_add_options = Object::create(global_object, nullptr); // h. Let end be ? CalendarDateAdd(calendar, intermediate, dateDuration2, secondAddOptions, dateAdd). @@ -1032,7 +1032,7 @@ ThrowCompletionOr<DurationRecord> add_duration(GlobalObject& global_object, doub // i. Let dateLargestUnit be ! LargerOfTwoTemporalUnits("day", largestUnit). auto date_largest_unit = larger_of_two_temporal_units("day"sv, largest_unit); - // j. Let differenceOptions be ! OrdinaryObjectCreate(null). + // j. Let differenceOptions be OrdinaryObjectCreate(null). auto* difference_options = Object::create(global_object, nullptr); // k. Perform ! CreateDataPropertyOrThrow(differenceOptions, "largestUnit", dateLargestUnit). @@ -1084,7 +1084,7 @@ ThrowCompletionOr<DurationRecord> add_duration(GlobalObject& global_object, doub // 7.5.23 MoveRelativeDate ( calendar, relativeTo, duration ), https://tc39.es/proposal-temporal/#sec-temporal-moverelativedate ThrowCompletionOr<MoveRelativeDateResult> move_relative_date(GlobalObject& global_object, Object& calendar, PlainDate& relative_to, Duration& duration) { - // 1. Let options be ! OrdinaryObjectCreate(null). + // 1. Let options be OrdinaryObjectCreate(null). auto* options = Object::create(global_object, nullptr); // 2. Let newDate be ? CalendarDateAdd(calendar, relativeTo, duration, options). @@ -1210,7 +1210,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // b. Let dateAdd be ? GetMethod(calendar, "dateAdd"). auto* date_add = TRY(Value(calendar).get_method(global_object, vm.names.dateAdd)); - // c. Let firstAddOptions be ! OrdinaryObjectCreate(null). + // c. Let firstAddOptions be OrdinaryObjectCreate(null). auto* first_add_options = Object::create(global_object, nullptr); // d. Let yearsLater be ? CalendarDateAdd(calendar, relativeTo, yearsDuration, firstAddOptions, dateAdd). @@ -1219,7 +1219,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // e. Let yearsMonthsWeeks be ? CreateTemporalDuration(years, months, weeks, 0, 0, 0, 0, 0, 0, 0). auto* years_months_weeks = TRY(create_temporal_duration(global_object, years, months, weeks, 0, 0, 0, 0, 0, 0, 0)); - // f. Let secondAddOptions be ! OrdinaryObjectCreate(null). + // f. Let secondAddOptions be OrdinaryObjectCreate(null). auto* second_add_options = Object::create(global_object, nullptr); // g. Let yearsMonthsWeeksLater be ? CalendarDateAdd(calendar, relativeTo, yearsMonthsWeeks, secondAddOptions, dateAdd). @@ -1237,13 +1237,13 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // k. Let daysDuration be ? CreateTemporalDuration(0, 0, 0, days, 0, 0, 0, 0, 0, 0). auto* days_duration = TRY(create_temporal_duration(global_object, 0, 0, 0, days, 0, 0, 0, 0, 0, 0)); - // l. Let thirdAddOptions be ! OrdinaryObjectCreate(null). + // l. Let thirdAddOptions be OrdinaryObjectCreate(null). auto* third_add_options = Object::create(global_object, nullptr); // m. Let daysLater be ? CalendarDateAdd(calendar, relativeTo, daysDuration, thirdAddOptions, dateAdd). auto* days_later = TRY(calendar_date_add(global_object, *calendar, relative_to, *days_duration, third_add_options, date_add)); - // n. Let untilOptions be ! OrdinaryObjectCreate(null). + // n. Let untilOptions be OrdinaryObjectCreate(null). auto* until_options = Object::create(global_object, nullptr); // o. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "year"). @@ -1264,7 +1264,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // t. Let yearsDuration be ? CreateTemporalDuration(yearsPassed, 0, 0, 0, 0, 0, 0, 0, 0, 0). years_duration = TRY(create_temporal_duration(global_object, years_passed, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - // u. Let fourthAddOptions be ! OrdinaryObjectCreate(null). + // u. Let fourthAddOptions be OrdinaryObjectCreate(null). auto* fourth_add_options = Object::create(global_object, nullptr); // v. Set relativeTo to ? CalendarDateAdd(calendar, relativeTo, yearsDuration, fourthAddOptions, dateAdd). @@ -1312,7 +1312,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // b. Let dateAdd be ? GetMethod(calendar, "dateAdd"). auto* date_add = TRY(Value(calendar).get_method(global_object, vm.names.dateAdd)); - // c. Let firstAddOptions be ! OrdinaryObjectCreate(null). + // c. Let firstAddOptions be OrdinaryObjectCreate(null). auto* first_add_options = Object::create(global_object, nullptr); // d. Let yearsMonthsLater be ? CalendarDateAdd(calendar, relativeTo, yearsMonths, firstAddOptions, dateAdd). @@ -1321,7 +1321,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d // e. Let yearsMonthsWeeks be ? CreateTemporalDuration(years, months, weeks, 0, 0, 0, 0, 0, 0, 0). auto* years_months_weeks = TRY(create_temporal_duration(global_object, years, months, weeks, 0, 0, 0, 0, 0, 0, 0)); - // f. Let secondAddOptions be ! OrdinaryObjectCreate(null). + // f. Let secondAddOptions be OrdinaryObjectCreate(null). auto* seconds_add_options = Object::create(global_object, nullptr); // g. Let yearsMonthsWeeksLater be ? CalendarDateAdd(calendar, relativeTo, yearsMonthsWeeks, secondAddOptions, dateAdd). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp index 58972e817b..ea1c8b7919 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp @@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::round) if (vm.argument(0).is_string()) { // a. Let paramString be roundTo. - // b. Set roundTo to ! OrdinaryObjectCreate(null). + // b. Set roundTo to OrdinaryObjectCreate(null). round_to = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString). @@ -477,7 +477,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::total) if (vm.argument(0).is_string()) { // a. Let paramString be totalOf. - // b. Set totalOf to ! OrdinaryObjectCreate(null). + // b. Set totalOf to OrdinaryObjectCreate(null). total_of = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(totalOf, "unit", paramString). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp index 5c2462f81f..c5dc6738b1 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Linus Groh <linusg@serenityos.org> + * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -262,7 +262,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round) if (vm.argument(0).is_string()) { // a. Let paramString be roundTo. - // b. Set roundTo to ! OrdinaryObjectCreate(null). + // b. Set roundTo to OrdinaryObjectCreate(null). round_to = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp index 4fec74c335..9f3525f592 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp @@ -73,7 +73,7 @@ ThrowCompletionOr<PlainDate*> to_temporal_date(GlobalObject& global_object, Valu { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp index e4b5fa1619..d423ef1c11 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp @@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]). auto* temporal_date = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Perform ! CreateDataPropertyOrThrow(fields, "calendar", temporalDate.[[Calendar]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp index 543a891d08..3d1270e1a5 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp @@ -57,13 +57,13 @@ BigInt* get_epoch_from_iso_parts(GlobalObject& global_object, i32 year, u8 month // 3. Assert: ! IsValidTime(hour, minute, second, millisecond, microsecond, nanosecond) is true. VERIFY(is_valid_time(hour, minute, second, millisecond, microsecond, nanosecond)); - // 4. Let date be ! MakeDay(𝔽(year), 𝔽(month − 1), 𝔽(day)). + // 4. Let date be MakeDay(𝔽(year), 𝔽(month − 1), 𝔽(day)). auto date = make_day(global_object, Value(year), Value(month - 1), Value(day)); - // 5. Let time be ! MakeTime(𝔽(hour), 𝔽(minute), 𝔽(second), 𝔽(millisecond)). + // 5. Let time be MakeTime(𝔽(hour), 𝔽(minute), 𝔽(second), 𝔽(millisecond)). auto time = make_time(global_object, Value(hour), Value(minute), Value(second), Value(millisecond)); - // 6. Let ms be ! MakeDate(date, time). + // 6. Let ms be MakeDate(date, time). auto ms = make_date(date, time); // 7. Assert: ms is finite. @@ -135,7 +135,7 @@ ThrowCompletionOr<PlainDateTime*> to_temporal_date_time(GlobalObject& global_obj { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); @@ -355,7 +355,7 @@ ThrowCompletionOr<DurationRecord> difference_iso_date_time(GlobalObject& global_ { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp index ffe25d9dc7..d5b896c7f6 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp @@ -640,7 +640,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::round) if (vm.argument(0).is_string()) { // a. Let paramString be roundTo. - // b. Set roundTo to ! OrdinaryObjectCreate(null). + // b. Set roundTo to OrdinaryObjectCreate(null). round_to = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString). @@ -844,7 +844,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). auto* date_time = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Perform ! CreateDataPropertyOrThrow(fields, "calendar", dateTime.[[Calendar]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp index d3311a5f7c..8eee6d9796 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDay.cpp @@ -38,7 +38,7 @@ ThrowCompletionOr<PlainMonthDay*> to_temporal_month_day(GlobalObject& global_obj { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); @@ -139,7 +139,7 @@ ThrowCompletionOr<PlainMonthDay*> to_temporal_month_day(GlobalObject& global_obj // 9. Set result to ? CreateTemporalMonthDay(result.[[Month]], result.[[Day]], calendar, referenceISOYear). auto* plain_month_day = TRY(create_temporal_month_day(global_object, result.month, result.day, *calendar, reference_iso_year)); - // 10. Let canonicalMonthDayOptions be ! OrdinaryObjectCreate(null). + // 10. Let canonicalMonthDayOptions be OrdinaryObjectCreate(null). auto* canonical_month_day_options = Object::create(global_object, nullptr); // 11. Return ? MonthDayFromFields(calendar, result, canonicalMonthDayOptions). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp index c6d1aab0f2..beca05e6c7 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Linus Groh <linusg@serenityos.org> + * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -245,7 +245,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date) // 11. Set mergedFields to ? PrepareTemporalFields(mergedFields, mergedFieldNames, «»). merged_fields = TRY(prepare_temporal_fields(global_object, *merged_fields, merged_field_names, {})); - // 12. Let options be ! OrdinaryObjectCreate(null). + // 12. Let options be OrdinaryObjectCreate(null). auto* options = Object::create(global_object, nullptr); // 13. Perform ! CreateDataPropertyOrThrow(options, "overflow", "reject"). @@ -262,7 +262,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]). auto* month_day = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Perform ! CreateDataPropertyOrThrow(fields, "calendar", monthDay.[[Calendar]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp index 23e2fd2e86..bcd2bddb06 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp @@ -362,7 +362,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::round) if (vm.argument(0).is_string()) { // a. Let paramString be roundTo. - // b. Set roundTo to ! OrdinaryObjectCreate(null). + // b. Set roundTo to OrdinaryObjectCreate(null). round_to = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString). @@ -523,7 +523,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). auto* temporal_time = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Perform ! CreateDataPropertyOrThrow(fields, "calendar", temporalTime.[[Calendar]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index c5061404ce..3921187351 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -35,7 +35,7 @@ ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_o { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); @@ -79,7 +79,7 @@ ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_o // 8. Set result to ? CreateTemporalYearMonth(result.[[Year]], result.[[Month]], calendar, result.[[Day]]). auto* creation_result = TRY(create_temporal_year_month(global_object, result.year, result.month, *calendar, result.day)); - // 9. Let canonicalYearMonthOptions be ! OrdinaryObjectCreate(null). + // 9. Let canonicalYearMonthOptions be OrdinaryObjectCreate(null). auto* canonical_year_month_options = Object::create(global_object, nullptr); // 10. Return ? YearMonthFromFields(calendar, result, canonicalYearMonthOptions). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp index 67eed7f8d7..7b53a0f57a 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp @@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::add) // 12. Let durationToAdd be ! CreateTemporalDuration(duration.[[Years]], duration.[[Months]], duration.[[Weeks]], balanceResult.[[Days]], 0, 0, 0, 0, 0, 0). auto* duration_to_add = MUST(create_temporal_duration(global_object, duration.years, duration.months, duration.weeks, balance_result.days, 0, 0, 0, 0, 0, 0)); - // 13. Let optionsCopy be ! OrdinaryObjectCreate(%Object.prototype%). + // 13. Let optionsCopy be OrdinaryObjectCreate(%Object.prototype%). auto* options_copy = Object::create(global_object, global_object.object_prototype()); // 14. Let entries be ? EnumerableOwnPropertyNames(options, key+value). @@ -355,7 +355,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::subtract) // 12. Let durationToAdd be ! CreateTemporalDuration(−duration.[[Years]], −duration.[[Months]], −duration.[[Weeks]], −balanceResult.[[Days]], 0, 0, 0, 0, 0, 0). auto* duration_to_add = MUST(create_temporal_duration(global_object, -duration.years, -duration.months, -duration.weeks, -balance_result.days, 0, 0, 0, 0, 0, 0)); - // 13. Let optionsCopy be ! OrdinaryObjectCreate(%Object.prototype%). + // 13. Let optionsCopy be OrdinaryObjectCreate(%Object.prototype%). auto* options_copy = Object::create(global_object, global_object.object_prototype()); // 14. Let entries be ? EnumerableOwnPropertyNames(options, key+value). @@ -663,7 +663,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date) // 11. Set mergedFields to ? PrepareTemporalFields(mergedFields, mergedFieldNames, «»). merged_fields = TRY(prepare_temporal_fields(global_object, *merged_fields, merged_field_names, {})); - // 12. Let options be ! OrdinaryObjectCreate(null). + // 12. Let options be OrdinaryObjectCreate(null). auto* options = Object::create(global_object, nullptr); // 13. Perform ! CreateDataPropertyOrThrow(options, "overflow", "reject"). @@ -680,7 +680,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]). auto* year_month = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Perform ! CreateDataPropertyOrThrow(fields, "calendar", yearMonth.[[Calendar]]). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp index 1cc4283341..dca600c3fd 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp @@ -432,7 +432,7 @@ ThrowCompletionOr<Object*> to_temporal_time_zone(GlobalObject& global_object, Va // 4. If parseResult.[[Name]] is not undefined, then if (parse_result.name.has_value()) { - // a. If ParseText(! StringToCodePoints(parseResult.[[Name]], TimeZoneNumericUTCOffset)) is not a List of errors, then + // a. If ParseText(StringToCodePoints(parseResult.[[Name]], TimeZoneNumericUTCOffset)) is not a List of errors, then if (is_valid_time_zone_numeric_utc_offset_syntax(*parse_result.name)) { // i. If parseResult.[[OffsetString]] is not undefined, and ! ParseTimeZoneOffsetString(parseResult.[[OffsetString]]) ≠ ! ParseTimeZoneOffsetString(parseResult.[[Name]]), throw a RangeError exception. if (parse_result.offset_string.has_value() && (MUST(parse_time_zone_offset_string(global_object, *parse_result.offset_string)) != MUST(parse_time_zone_offset_string(global_object, *parse_result.name)))) @@ -472,7 +472,7 @@ ThrowCompletionOr<double> get_offset_nanoseconds_for(GlobalObject& global_object if (!offset_nanoseconds_value.is_number()) return vm.throw_completion<TypeError>(global_object, ErrorType::IsNotA, "Offset nanoseconds value", "number"); - // 4. If ! IsIntegralNumber(offsetNanoseconds) is false, throw a RangeError exception. + // 4. If IsIntegralNumber(offsetNanoseconds) is false, throw a RangeError exception. if (!offset_nanoseconds_value.is_integral_number()) return vm.throw_completion<RangeError>(global_object, ErrorType::IsNotAn, "Offset nanoseconds value", "integral number"); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp index 753985b059..746e3a9bd1 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp @@ -50,7 +50,7 @@ ThrowCompletionOr<Object*> TimeZoneConstructor::construct(FunctionObject& new_ta // 2. Set identifier to ? ToString(identifier). auto identifier = TRY(vm.argument(0).to_string(global_object)); - // 3. Let parseResult be ParseText(! StringToCodePoints(identifier), TimeZoneNumericUTCOffset). + // 3. Let parseResult be ParseText(StringToCodePoints(identifier), TimeZoneNumericUTCOffset). // 4. If parseResult is a List of errors, then if (!is_valid_time_zone_numeric_utc_offset_syntax(identifier)) { // a. If ! IsValidTimeZoneName(identifier) is false, then diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp index feabeeb0f0..c02de4919f 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Linus Groh <linusg@serenityos.org> + * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -143,7 +143,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_possible_instants_for) // b. Let instant be ! CreateTemporalInstant(ℤ(epochNanoseconds − timeZone.[[OffsetNanoseconds]])). auto* instant = MUST(create_temporal_instant(global_object, *js_bigint(vm, epoch_nanoseconds->big_integer().minus(Crypto::SignedBigInteger::create_from(*time_zone->offset_nanoseconds()))))); - // c. Return ! CreateArrayFromList(« instant »). + // c. Return CreateArrayFromList(« instant »). return Array::create_from(global_object, { instant }); } @@ -162,7 +162,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_possible_instants_for) possible_instants.append(instant); } - // 8. Return ! CreateArrayFromList(possibleInstants). + // 8. Return CreateArrayFromList(possibleInstants). return Array::create_from(global_object, possible_instants); } diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp index a9cb2fa7d9..1a69c225ce 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTime.cpp @@ -118,7 +118,7 @@ ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& glob { auto& vm = global_object.vm(); - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); @@ -201,7 +201,7 @@ ThrowCompletionOr<ZonedDateTime*> to_temporal_zoned_date_time(GlobalObject& glob // e. Assert: timeZoneName is not undefined. VERIFY(time_zone_name.has_value()); - // f. If ParseText(! StringToCodePoints(timeZoneName), TimeZoneNumericUTCOffset) is a List of errors, then + // f. If ParseText(StringToCodePoints(timeZoneName), TimeZoneNumericUTCOffset) is a List of errors, then if (!is_valid_time_zone_numeric_utc_offset_syntax(*time_zone_name)) { // i. If ! IsValidTimeZoneName(timeZoneName) is false, throw a RangeError exception. if (!is_valid_time_zone_name(*time_zone_name)) @@ -367,7 +367,7 @@ ThrowCompletionOr<String> temporal_zoned_date_time_to_string(GlobalObject& globa // 6.5.5 AddZonedDateTime ( epochNanoseconds, timeZone, calendar, years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal-addzoneddatetime ThrowCompletionOr<BigInt*> add_zoned_date_time(GlobalObject& global_object, BigInt const& epoch_nanoseconds, Value time_zone, Object& calendar, double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds, Object* options) { - // 1. If options is not present, set options to ! OrdinaryObjectCreate(null). + // 1. If options is not present, set options to OrdinaryObjectCreate(null). if (!options) options = Object::create(global_object, nullptr); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp index 6ae2797764..681457197a 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp @@ -1114,7 +1114,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::round) if (vm.argument(0).is_string()) { // a. Let paramString be roundTo. - // b. Set roundTo to ! OrdinaryObjectCreate(null). + // b. Set roundTo to OrdinaryObjectCreate(null). round_to = Object::create(global_object, nullptr); // c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString). @@ -1441,7 +1441,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::get_iso_fields) // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]). auto* zoned_date_time = TRY(typed_this_object(global_object)); - // 3. Let fields be ! OrdinaryObjectCreate(%Object.prototype%). + // 3. Let fields be OrdinaryObjectCreate(%Object.prototype%). auto* fields = Object::create(global_object, global_object.object_prototype()); // 4. Let timeZone be zonedDateTime.[[TimeZone]]. |