Index: third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py |
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py |
index 70dc94b5c0ebdfa8a236999f19dbadbe725bb28f..f321c448b0d1393511a2d56444d3890a8352dbbc 100644 |
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py |
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py |
@@ -230,6 +230,8 @@ def GetCppFieldType(kind): |
def GetCppUnionFieldType(kind): |
if mojom.IsAnyHandleKind(kind): |
return "MojoHandle" |
+ if mojom.IsInterfaceKind(kind): |
+ return "uint64_t" |
if mojom.IsEnumKind(kind): |
return "int32_t" |
if mojom.IsUnionKind(kind): |
@@ -240,7 +242,7 @@ def GetCppUnionFieldType(kind): |
def GetUnionGetterReturnType(kind): |
if (mojom.IsStructKind(kind) or mojom.IsUnionKind(kind) or |
mojom.IsArrayKind(kind) or mojom.IsMapKind(kind) or |
- mojom.IsAnyHandleKind(kind)): |
+ mojom.IsAnyHandleKind(kind) or mojom.IsInterfaceKind(kind)): |
return "%s&" % GetCppWrapperType(kind) |
return GetCppResultWrapperType(kind) |