mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
7177c14789
commit
f8d6d759db
1 file changed
+4
-2
+4
-2
@@ -671,7 +671,8 @@ void ExportBytes(const FunctionCallbackInfo<Value>& args) {
|
||||
if (args.Length() < 1) {
|
||||
THROW_ERR_INVALID_ARG_TYPE(
|
||||
env,
|
||||
"The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView");
|
||||
"The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, "
|
||||
"or ArrayBufferView");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -689,7 +690,8 @@ void ExportBytes(const FunctionCallbackInfo<Value>& args) {
|
||||
} else {
|
||||
THROW_ERR_INVALID_ARG_TYPE(
|
||||
env,
|
||||
"The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView");
|
||||
"The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, "
|
||||
"or ArrayBufferView");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user