mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Make DOMException GC-allocated
This commit is contained in:
parent
0e47754ac8
commit
497ead37bc
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/awesomekling
Commit: 497ead37bc
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
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