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:
parent
500411b77e
commit
0d2c6c6215
|
@ -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 }}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue