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:
Ben Clayton 2021-09-28 18:08:13 +00:00 committed by Dawn LUCI CQ
parent 5a18c2aab8
commit 5d1613db8e
1 changed files with 1 additions and 1 deletions

View File

@ -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) {