From 9af80e10cec000fe6cdbd4037b2154e2ffa08b2d Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Tue, 20 Apr 2021 22:53:49 +0200 Subject: [PATCH] Accept SharedArrayBuffers as input --- src/Utilities.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Utilities.h b/src/Utilities.h index eb2037d..e3edd78 100644 --- a/src/Utilities.h +++ b/src/Utilities.h @@ -111,6 +111,11 @@ public: ArrayBuffer::Contents contents = arrayBuffer->GetContents(); length = contents.ByteLength(); data = (char *) contents.Data(); + } else if (value->IsSharedArrayBuffer()) { + Local arrayBuffer = Local::Cast(value); + SharedArrayBuffer::Contents contents = arrayBuffer->GetContents(); + length = contents.ByteLength(); + data = (char *) contents.Data(); } else { invalid = true; }