summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-02-12 20:38:28 -0500
committerLinus Groh <mail@linusgroh.de>2023-02-16 14:32:22 +0100
commitb245300ba132ea3bce21c82ea585ce8ea85cca40 (patch)
tree3fc95ce9b306dac23d3486eeabc60bb9a53c57cc /Userland/Applications
parent7fc7d4f8c642d776488a52758e428b33fd8e6693 (diff)
downloadserenity-b245300ba132ea3bce21c82ea585ce8ea85cca40.zip
LibJS+Everywhere: Deprecate Value::to_string_without_side_effects
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Assistant/Providers.cpp2
-rw-r--r--Userland/Applications/Spreadsheet/Cell.cpp2
-rw-r--r--Userland/Applications/Spreadsheet/Spreadsheet.cpp6
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetModel.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Applications/Assistant/Providers.cpp b/Userland/Applications/Assistant/Providers.cpp
index 97ca9b3c17..ee4bb0988c 100644
--- a/Userland/Applications/Assistant/Providers.cpp
+++ b/Userland/Applications/Assistant/Providers.cpp
@@ -105,7 +105,7 @@ void CalculatorProvider::query(DeprecatedString const& query, Function<void(Nonn
if (!result.is_number()) {
calculation = "0";
} else {
- calculation = result.to_string_without_side_effects();
+ calculation = result.to_deprecated_string_without_side_effects();
}
NonnullRefPtrVector<Result> results;
diff --git a/Userland/Applications/Spreadsheet/Cell.cpp b/Userland/Applications/Spreadsheet/Cell.cpp
index d56b48e454..e308f74afb 100644
--- a/Userland/Applications/Spreadsheet/Cell.cpp
+++ b/Userland/Applications/Spreadsheet/Cell.cpp
@@ -41,7 +41,7 @@ void Cell::set_data(JS::Value new_data)
StringBuilder builder;
- builder.append(new_data.to_string_without_side_effects());
+ builder.append(new_data.to_deprecated_string_without_side_effects());
m_data = builder.to_deprecated_string();
m_evaluated_data = move(new_data);
diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
index 94b12d07f0..cc6d8034c1 100644
--- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp
+++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
@@ -64,7 +64,7 @@ Sheet::Sheet(Workbook& workbook)
if (result.is_error()) {
warnln("Spreadsheet: Failed to run runtime code:");
auto thrown_value = *result.throw_completion().value();
- warn("Threw: {}", thrown_value.to_string_without_side_effects());
+ warn("Threw: {}", thrown_value.to_deprecated_string_without_side_effects());
if (thrown_value.is_object() && is<JS::Error>(thrown_value.as_object())) {
auto& error = static_cast<JS::Error const&>(thrown_value.as_object());
warnln(" with message '{}'", error.get_without_side_effects(interpreter().vm().names.message));
@@ -562,7 +562,7 @@ JsonObject Sheet::to_json() const
auto json = interpreter().realm().global_object().get_without_side_effects("JSON");
auto stringified_or_error = JS::call(vm, json.as_object().get_without_side_effects("stringify").as_function(), json, it.value->evaluated_data());
VERIFY(!stringified_or_error.is_error());
- data.set("value", stringified_or_error.release_value().to_string_without_side_effects());
+ data.set("value", stringified_or_error.release_value().to_deprecated_string_without_side_effects());
} else {
data.set("value", it.value->data());
}
@@ -693,7 +693,7 @@ JsonObject Sheet::gather_documentation() const
if (!doc.is_string())
return;
- JsonParser parser(doc.to_string_without_side_effects());
+ JsonParser parser(doc.to_deprecated_string_without_side_effects());
auto doc_object = parser.parse();
if (!doc_object.is_error())
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
index df3607687f..3f90b4e2c3 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
@@ -33,7 +33,7 @@ GUI::Variant SheetModel::data(const GUI::ModelIndex& index, GUI::ModelRole role)
auto message = object.get_without_side_effects("message");
auto error = message.to_deprecated_string(vm);
if (error.is_throw_completion())
- builder.append(message.to_string_without_side_effects());
+ builder.append(message.to_deprecated_string_without_side_effects());
else
builder.append(error.release_value());
return builder.to_deprecated_string();
@@ -120,7 +120,7 @@ GUI::Variant SheetModel::data(const GUI::ModelIndex& index, GUI::ModelRole role)
auto& error = static_cast<JS::Error&>(object);
auto const& trace = error.traceback();
StringBuilder builder;
- builder.appendff("{}\n", error.get_without_side_effects(object.vm().names.message).to_string_without_side_effects());
+ builder.appendff("{}\n", error.get_without_side_effects(object.vm().names.message).to_deprecated_string_without_side_effects());
for (auto const& frame : trace.in_reverse()) {
if (frame.source_range.filename().contains("runtime.js"sv)) {
if (frame.function_name == "<unknown>")