mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Convert remaining usages of Value::TDSWOSE to Value::TSWOSE
Note the couple of cases using MUST are just debugging statements.
This commit is contained in:
parent
c17589a402
commit
24e9cea524
8 changed files with 28 additions and 22 deletions
|
@ -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_deprecated_string_without_side_effects())));
|
||||
TRY(output_html.try_append(escape_html_entities(TRY(value.to_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_deprecated_string_without_side_effects();
|
||||
auto message_string = message.to_deprecated_string_without_side_effects();
|
||||
auto name_string = TRY(name.to_string_without_side_effects());
|
||||
auto message_string = TRY(message.to_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()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue