mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Verify buffer type in WebIDL get buffer source copy AO
This commit is contained in:
parent
ba6dcd7521
commit
881a270e58
Notes:
github-actions[bot]
2024-11-01 17:43:19 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/881a270e582 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1982
1 changed files with 1 additions and 0 deletions
|
@ -76,6 +76,7 @@ ErrorOr<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source)
|
|||
// 6. Otherwise:
|
||||
else {
|
||||
// 1. Assert: esBufferSource is an ArrayBuffer or SharedArrayBuffer object.
|
||||
VERIFY(is<JS::ArrayBuffer>(buffer_source));
|
||||
auto const& es_buffer_source = static_cast<JS::ArrayBuffer const&>(buffer_source);
|
||||
es_array_buffer = &const_cast<JS::ArrayBuffer&>(es_buffer_source);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue