1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 04:37:44 +00:00

LibJS+Everywhere: Rename Value::to_string to to_deprecated_string

This commit is contained in:
Timothy Flynn 2023-01-13 10:29:02 -05:00 committed by Linus Groh
parent 8f5bdce8e7
commit afeb7273cc
68 changed files with 193 additions and 193 deletions

View file

@ -22,7 +22,7 @@ JS::ThrowCompletionOr<DeprecatedString> IdentityCell::display(Cell& cell, CellTy
if (!metadata.format.is_empty())
data = TRY(cell.sheet().evaluate(metadata.format, &cell));
return data.to_string(vm);
return data.to_deprecated_string(vm);
}
JS::ThrowCompletionOr<JS::Value> IdentityCell::js_value(Cell& cell, CellTypeMetadata const&) const

View file

@ -24,7 +24,7 @@ JS::ThrowCompletionOr<DeprecatedString> NumericCell::display(Cell& cell, CellTyp
auto value = TRY(js_value(cell, metadata));
DeprecatedString string;
if (metadata.format.is_empty())
string = TRY(value.to_string(vm));
string = TRY(value.to_deprecated_string(vm));
else
string = format_double(metadata.format.characters(), TRY(value.to_double(vm)));

View file

@ -18,7 +18,7 @@ StringCell::StringCell()
JS::ThrowCompletionOr<DeprecatedString> StringCell::display(Cell& cell, CellTypeMetadata const& metadata) const
{
auto& vm = cell.sheet().global_object().vm();
auto string = TRY(cell.js_data().to_string(vm));
auto string = TRY(cell.js_data().to_deprecated_string(vm));
if (metadata.length >= 0)
return string.substring(0, metadata.length);

View file

@ -31,7 +31,7 @@ GUI::Variant SheetModel::data(const GUI::ModelIndex& index, GUI::ModelRole role)
auto& object = value.as_object();
if (is<JS::Error>(object)) {
auto message = object.get_without_side_effects("message");
auto error = message.to_string(vm);
auto error = message.to_deprecated_string(vm);
if (error.is_throw_completion())
builder.append(message.to_string_without_side_effects());
else
@ -39,7 +39,7 @@ GUI::Variant SheetModel::data(const GUI::ModelIndex& index, GUI::ModelRole role)
return builder.to_deprecated_string();
}
}
auto error_message = value.to_string(vm);
auto error_message = value.to_deprecated_string(vm);
if (error_message.is_throw_completion())
return to_deprecated_string_as_exception(*error_message.release_error().value());