1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +00:00

LibJS: Make CreateDataByteBlock AO publicly available

At the same time, make CopyDataBlockBytes const-correct.
This commit is contained in:
Andrew Kaster 2023-09-11 18:03:42 -06:00 committed by Andreas Kling
parent 267074cd81
commit 56d0a0ac0f
2 changed files with 4 additions and 3 deletions

View file

@ -99,7 +99,8 @@ private:
Value m_detach_key;
};
void copy_data_block_bytes(ByteBuffer& to_block, u64 to_index, ByteBuffer& from_block, u64 from_index, u64 count);
ThrowCompletionOr<ByteBuffer> create_byte_data_block(VM& vm, size_t size);
void copy_data_block_bytes(ByteBuffer& to_block, u64 to_index, ByteBuffer const& from_block, u64 from_index, u64 count);
ThrowCompletionOr<ArrayBuffer*> allocate_array_buffer(VM&, FunctionObject& constructor, size_t byte_length);
ThrowCompletionOr<void> detach_array_buffer(VM&, ArrayBuffer& array_buffer, Optional<Value> key = {});
ThrowCompletionOr<ArrayBuffer*> clone_array_buffer(VM&, ArrayBuffer& source_buffer, size_t source_byte_offset, size_t source_length);