1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 05:37:35 +00:00

LibJS: Make Value::to_string_without_side_effects() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-09 08:49:02 +02:00
parent b8f78c0adc
commit 97ebfd9f0f
69 changed files with 182 additions and 182 deletions

View file

@ -375,7 +375,7 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
auto& arr = user_output.as_array();
for (auto& entry : arr.indexed_properties()) {
auto message = MUST(arr.get(entry.index()));
file_result.logged_messages.append(message.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors().to_deprecated_string());
file_result.logged_messages.append(message.to_string_without_side_effects().to_deprecated_string());
}
test_json.value().as_object().for_each_member([&](DeprecatedString const& suite_name, JsonValue const& suite_value) {
@ -448,11 +448,11 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
auto message = error_object.get_without_side_effects(g_vm->names.message).value_or(JS::js_undefined());
if (name.is_accessor() || message.is_accessor()) {
detail_builder.append(error.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors());
detail_builder.append(error.to_string_without_side_effects());
} else {
detail_builder.append(name.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors());
detail_builder.append(name.to_string_without_side_effects());
detail_builder.append(": "sv);
detail_builder.append(message.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors());
detail_builder.append(message.to_string_without_side_effects());
}
if (is<JS::Error>(error_object)) {
@ -463,7 +463,7 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
test_case.details = detail_builder.to_deprecated_string();
} else {
test_case.details = error.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors().to_deprecated_string();
test_case.details = error.to_string_without_side_effects().to_deprecated_string();
}
suite.tests.append(move(test_case));