Commit 8aea1de0 authored by Christopher Lam's avatar Christopher Lam Committed by Commit Bot

Fix Interface JS externs generation for mojo.

This CL fixes an issue with JS externs generation for Interface types
in mojo. This was blocking
https://chromium-review.googlesource.com/c/chromium/src/+/1053381.

Bug: 632206
Change-Id: I164bc3d9e9b0fd43f438dfefeaa2bc6e731fd1e7
Reviewed-on: https://chromium-review.googlesource.com/1053332Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558637}
parent d172dbe3
......@@ -332,7 +332,9 @@ class Generator(generator.Generator):
def _ClosureType(self, kind):
if kind in mojom.PRIMITIVES:
return _kind_to_closure_type[kind]
if (mojom.IsStructKind(kind) or mojom.IsInterfaceKind(kind) or
if mojom.IsInterfaceKind(kind):
return kind.module.namespace + "." + kind.name + "Ptr"
if (mojom.IsStructKind(kind) or
mojom.IsEnumKind(kind)):
return kind.module.namespace + "." + kind.name
# TODO(calamity): Support unions properly.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment