mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibJS: Convert ArrayBuffer::create() to NonnullGCPtr
This commit is contained in:
parent
91b0123eaf
commit
947ea92bf6
Notes:
sideshowbarker
2024-07-17 03:18:45 +09:00
Author: https://github.com/linusg
Commit: 947ea92bf6
Pull-request: https://github.com/SerenityOS/serenity/pull/16479
Reviewed-by: https://github.com/davidot ✅
7 changed files with 15 additions and 15 deletions
|
@ -39,7 +39,7 @@ JS::Uint8Array* TextEncoder::encode(DeprecatedString const& input) const
|
|||
|
||||
auto byte_buffer = input.to_byte_buffer();
|
||||
auto array_length = byte_buffer.size();
|
||||
auto* array_buffer = JS::ArrayBuffer::create(realm(), move(byte_buffer));
|
||||
auto array_buffer = JS::ArrayBuffer::create(realm(), move(byte_buffer));
|
||||
return JS::Uint8Array::create(realm(), array_length, *array_buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue