dawn_node: Return undefined for "void" methods instead of null

Bug: dawn:1123
Change-Id: I38a5b160c12485ea23b34a6b3c8cdf44baee2ada
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75903
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2022-01-10 14:30:14 +00:00 committed by Dawn LUCI CQ
parent 500411b77e
commit 0d2c6c6215
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ Wrappers* Wrappers::instance = nullptr;
{{- if not (IsUndefinedType $o.Type) }}auto result = {{end -}} {{- if not (IsUndefinedType $o.Type) }}auto result = {{end -}}
impl->{{$o.Name}}(info.Env(){{range $i, $_ := $o.Parameters}}, std::get<{{$i}}>(args){{end}}); impl->{{$o.Name}}(info.Env(){{range $i, $_ := $o.Parameters}}, std::get<{{$i}}>(args){{end}});
{{/* indent */ -}} {{/* indent */ -}}
{{- if IsUndefinedType $o.Type}}return info.Env().Null(); {{- if IsUndefinedType $o.Type}}return info.Env().Undefined();
{{- else }}return ToJS(info.Env(), result); {{- else }}return ToJS(info.Env(), result);
{{- end }} {{- end }}
} }