mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Allow and check for detached ArrayBuffers
This is required by the specification and will be used for the $262.detachArrayBuffer method in test262.
This commit is contained in:
parent
7d6db3f09b
commit
8527f00065
Notes:
sideshowbarker
2024-07-18 12:28:14 +09:00
Author: https://github.com/IdanHo
Commit: 8527f00065
Pull-request: https://github.com/SerenityOS/serenity/pull/7974
Reviewed-by: https://github.com/linusg
6 changed files with 46 additions and 11 deletions
|
@ -22,12 +22,14 @@ ArrayBuffer* ArrayBuffer::create(GlobalObject& global_object, ByteBuffer* buffer
|
|||
ArrayBuffer::ArrayBuffer(size_t byte_size, Object& prototype)
|
||||
: Object(prototype)
|
||||
, m_buffer(ByteBuffer::create_zeroed(byte_size))
|
||||
, m_detach_key(js_undefined())
|
||||
{
|
||||
}
|
||||
|
||||
ArrayBuffer::ArrayBuffer(ByteBuffer* buffer, Object& prototype)
|
||||
: Object(prototype)
|
||||
, m_buffer(buffer)
|
||||
, m_detach_key(js_undefined())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue