Accept SharedArrayBuffers as input
This commit is contained in:
parent
324b5145d9
commit
9af80e10ce
@ -111,6 +111,11 @@ public:
|
||||
ArrayBuffer::Contents contents = arrayBuffer->GetContents();
|
||||
length = contents.ByteLength();
|
||||
data = (char *) contents.Data();
|
||||
} else if (value->IsSharedArrayBuffer()) {
|
||||
Local<SharedArrayBuffer> arrayBuffer = Local<SharedArrayBuffer>::Cast(value);
|
||||
SharedArrayBuffer::Contents contents = arrayBuffer->GetContents();
|
||||
length = contents.ByteLength();
|
||||
data = (char *) contents.Data();
|
||||
} else {
|
||||
invalid = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user