| Index: mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
|
| diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py b/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
|
| index 3bf13715bbce637de57c6b7297c3ed55905af747..4a7d95cbcd4d948110110268fd9aa09d5f06f82b 100755
|
| --- a/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
|
| +++ b/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
|
| @@ -393,12 +393,16 @@ class FileTranslator(object):
|
| == mojom_types_mojom.UserDefinedType.Tags.interface_type)
|
| mojom_interface = mojom_type.interface_type
|
| interface.attributes = self.AttributesFromMojom(mojom_interface)
|
| - interface.service_name = None
|
| - if interface.attributes:
|
| - interface.service_name = interface.attributes.get('ServiceName')
|
| self.PopulateModuleOrImportedFrom(interface, mojom_interface)
|
| - interface.name = mojom_interface.interface_name
|
| + interface.name = mojom_interface.decl_data.short_name
|
| interface.spec = interface.name
|
| + interface.service_name = mojom_interface.service_name
|
| + if interface.attributes:
|
| + assert interface.service_name == interface.attributes.get(
|
| + 'ServiceName', None), interface.service_name
|
| + else:
|
| + assert interface.service_name is None, interface.service_name
|
| +
|
|
|
| # Translate the dictionary of methods into a list of module.Methods.
|
| # In order to have a deterministic ordering we sort by method ordinal.
|
|
|