mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Linus Groh
parent
7d6db3f09b
commit
8527f00065
@@ -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())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user