mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibTextCodec+Everywhere: Port Decoders to new Strings
This commit is contained in:
parent
3c5090e172
commit
2db168acc1
21 changed files with 149 additions and 123 deletions
|
@ -27,7 +27,7 @@ WebIDL::ExceptionOr<JS::Value> parse_json_bytes_to_javascript_value(JS::VM& vm,
|
|||
{
|
||||
// 1. Let string be the result of running UTF-8 decode on bytes.
|
||||
TextCodec::UTF8Decoder decoder;
|
||||
auto string = decoder.to_utf8(bytes);
|
||||
auto string = TRY_OR_THROW_OOM(vm, decoder.to_utf8(bytes));
|
||||
|
||||
// 2. Return the result of parsing a JSON string to an Infra value given string.
|
||||
return parse_json_string_to_javascript_value(vm, string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue