mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 19:52:07 +00:00
LibWeb: Make DOMException GC-allocated
This commit is contained in:
parent
0e47754ac8
commit
497ead37bc
58 changed files with 307 additions and 278 deletions
|
@ -41,7 +41,7 @@ DOM::ExceptionOr<String> TextDecoder::decode(JS::Handle<JS::Object> const& input
|
|||
|
||||
auto data_buffer_or_error = Bindings::IDL::get_buffer_source_copy(*input.cell());
|
||||
if (data_buffer_or_error.is_error())
|
||||
return DOM::OperationError::create("Failed to copy bytes from ArrayBuffer");
|
||||
return DOM::OperationError::create(global_object(), "Failed to copy bytes from ArrayBuffer");
|
||||
auto& data_buffer = data_buffer_or_error.value();
|
||||
return m_decoder.to_utf8({ data_buffer.data(), data_buffer.size() });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue