From 2c9fe2130827d7a9032c1e3e5217f534ad5f2eb7 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 5 Oct 2021 16:33:19 +0000 Subject: [PATCH] dawn_node: Make StaticValues property-like Makes them appear in Object methods like length(). Fixes a number of webgpu:idl,constants,flags tests. Bug: dawn:1123 Change-Id: I2f1baf9c3c51915ce0b0a5dc392cf86aac761676 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65661 Reviewed-by: Antonio Maiorano Reviewed-by: Austin Eng Commit-Queue: Ben Clayton --- src/dawn_node/interop/WebGPU.cpp.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn_node/interop/WebGPU.cpp.tmpl b/src/dawn_node/interop/WebGPU.cpp.tmpl index 2270255bb2..0c0dc3fd4a 100644 --- a/src/dawn_node/interop/WebGPU.cpp.tmpl +++ b/src/dawn_node/interop/WebGPU.cpp.tmpl @@ -154,7 +154,7 @@ Wrappers* Wrappers::instance = nullptr; ), {{- end}} {{- range $c := ConstantsOf $}} - StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}})), + StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}}), napi_default_jsproperty), {{- end}} }); }