1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibJS: Replace to_deprecated_string() with to_string() in Temporal

Turns out all of these can already be replaced with no further changes!
This commit is contained in:
Linus Groh 2023-01-28 22:54:44 +00:00
parent 890b4d7980
commit b41e7b7e86
7 changed files with 14 additions and 14 deletions

View file

@ -390,7 +390,7 @@ ThrowCompletionOr<SecondsStringPrecision> to_seconds_string_precision(VM& vm, Ob
// a. If fractionalDigitsVal is not undefined, then
if (!fractional_digits_value.is_undefined()) {
// i. If ? ToString(fractionalDigitsVal) is not "auto", throw a RangeError exception.
if (TRY(fractional_digits_value.to_deprecated_string(vm)) != "auto"sv)
if (TRY(fractional_digits_value.to_string(vm)) != "auto"sv)
return vm.template throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, fractional_digits_value, "fractionalSecondDigits"sv);
}
@ -690,7 +690,7 @@ ThrowCompletionOr<Value> to_relative_temporal_object(VM& vm, Object const& optio
if (offset_behavior == OffsetBehavior::Option) {
// a. Set offsetString to ? ToString(offsetString).
// NOTE: offsetString is not used after this path, so we don't need to put this into the original offset_string which is of type JS::Value.
auto actual_offset_string = TRY(offset_string.to_deprecated_string(vm));
auto actual_offset_string = TRY(offset_string.to_string(vm));
// b. If IsTimeZoneOffsetString(offsetString) is false, throw a RangeError exception.
if (!is_time_zone_offset_string(actual_offset_string))