mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS: Propagate OOM from GetValueFromBuffer AO
This commit is contained in:
parent
49c8d22f50
commit
3bb15d3dae
5 changed files with 12 additions and 13 deletions
|
@ -74,7 +74,7 @@ ErrorOr<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source)
|
|||
|
||||
// 9. For i in the range offset to offset + length − 1, inclusive, set bytes[i − offset] to ! GetValueFromBuffer(esArrayBuffer, i, Uint8, true, Unordered).
|
||||
for (u64 i = offset; i < offset + length; ++i) {
|
||||
auto value = es_array_buffer->get_value<u8>(i, true, JS::ArrayBuffer::Unordered);
|
||||
auto value = es_array_buffer->get_value<u8>(i, true, JS::ArrayBuffer::Unordered).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
bytes[i - offset] = static_cast<u8>(value.as_double());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue