Skip to content

Commit 8b9d2bd

Browse files
HoonDongKangaduh95
authored andcommitted
ffi: include SharedArrayBuffer in error message
ExportBytes accepts SharedArrayBuffer inputs, but its invalid argument messages do not list SharedArrayBuffer as a supported input type. Signed-off-by: HoonDongKang <d159123@naver.com> PR-URL: #65735 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 15bba98 commit 8b9d2bd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/ffi/data.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ void ExportBytes(const FunctionCallbackInfo<Value>& args) {
671671
if (args.Length() < 1) {
672672
THROW_ERR_INVALID_ARG_TYPE(
673673
env,
674-
"The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView");
674+
"The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, "
675+
"or ArrayBufferView");
675676
return;
676677
}
677678

@@ -689,7 +690,8 @@ void ExportBytes(const FunctionCallbackInfo<Value>& args) {
689690
} else {
690691
THROW_ERR_INVALID_ARG_TYPE(
691692
env,
692-
"The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView");
693+
"The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, "
694+
"or ArrayBufferView");
693695
return;
694696
}
695697

0 commit comments

Comments
 (0)