dawn.node: Make attributes enumerable.
Fixes some of the operation,reflection tests.
Bug: None
Change-Id: I0998da45384956c082403c8470ce84dba8960514
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/166423
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/dawn/node/interop/WebGPU.cpp.tmpl b/src/dawn/node/interop/WebGPU.cpp.tmpl
index f7675fe..e66b6f5 100644
--- a/src/dawn/node/interop/WebGPU.cpp.tmpl
+++ b/src/dawn/node/interop/WebGPU.cpp.tmpl
@@ -170,8 +170,8 @@
{{- range $a := $attributes}}
{{- if not (HasAnnotation $a "SameObject")}}
InstanceAccessor("{{$a.Name}}", &W{{$.Name}}::get{{Title $a.Name}},
-{{- if $a.Readonly}} nullptr{{else}} &W{{$.Name}}::set{{Title $a.Name}}{{end -}}
- ),
+{{- if $a.Readonly}} nullptr,{{else}} &W{{$.Name}}::set{{Title $a.Name}},{{end -}}
+ napi_enumerable),
{{- end}}
{{- end}}
{{- range $c := $constants}}