dawn_node: Fix Converter<Napi::TypedArrayOf<T>>::FromJS
The conversion should only pass if the element type matches. Bug: dawn:1123 Change-Id: I700a445e8d281afdc36d1b6f9be73767ca89d4ea Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65240 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
5a18c2aab8
commit
5d1613db8e
|
@ -279,9 +279,9 @@ namespace wgpu { namespace interop {
|
|||
auto arr = value.As<Napi::TypedArrayOf<T>>();
|
||||
if (arr.TypedArrayType() == element_type) {
|
||||
out = arr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
static inline Napi::Value ToJS(Napi::Env, ArrayBuffer value) {
|
||||
|
|
Loading…
Reference in New Issue