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 <amaiorano@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
37144dee3c
commit
2c9fe21308
|
@ -154,7 +154,7 @@ Wrappers* Wrappers::instance = nullptr;
|
||||||
),
|
),
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- range $c := ConstantsOf $}}
|
{{- range $c := ConstantsOf $}}
|
||||||
StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}})),
|
StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}}), napi_default_jsproperty),
|
||||||
{{- end}}
|
{{- end}}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue