1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

LibJS+Everywhere: Deprecate Value::to_string_without_side_effects

This commit is contained in:
Timothy Flynn 2023-02-12 20:38:28 -05:00 committed by Linus Groh
parent 7fc7d4f8c6
commit b245300ba1
65 changed files with 168 additions and 168 deletions

View file

@ -81,7 +81,7 @@ ErrorOr<void> MarkupGenerator::value_to_html(Value value, StringBuilder& output_
if (value.is_string())
TRY(output_html.try_append('"'));
TRY(output_html.try_append(escape_html_entities(value.to_string_without_side_effects())));
TRY(output_html.try_append(escape_html_entities(value.to_deprecated_string_without_side_effects())));
if (value.is_string())
TRY(output_html.try_append('"'));
@ -167,8 +167,8 @@ ErrorOr<void> MarkupGenerator::error_to_html(Error const& error, StringBuilder&
auto& vm = error.vm();
auto name = error.get_without_side_effects(vm.names.name).value_or(js_undefined());
auto message = error.get_without_side_effects(vm.names.message).value_or(js_undefined());
auto name_string = name.to_string_without_side_effects();
auto message_string = message.to_string_without_side_effects();
auto name_string = name.to_deprecated_string_without_side_effects();
auto message_string = message.to_deprecated_string_without_side_effects();
auto uncaught_message = TRY(String::formatted("Uncaught {}[{}]: ", in_promise ? "(in promise) " : "", name_string));
TRY(html_output.try_append(TRY(wrap_string_in_style(uncaught_message, StyleType::Invalid)).bytes_as_string_view()));