mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +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
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