Index: mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart |
index b03e037158d85ebf088b8932898f62e69ed0c736..ac858704633406fc2c5ef1d5ca7ea8821563046c 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart |
@@ -461,13 +461,13 @@ mojom_types.MojomInterface _sampleImportImportedInterface() { |
class _ImportedInterfaceServiceDescription implements service_describer.ServiceDescription { |
dynamic getTopLevelInterface([Function responseFactory]) => |
- _sampleImportImportedInterface(); |
+ responseFactory(_sampleImportImportedInterface()); |
dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
- getAllMojomTypeDefinitions()[typeKey]; |
+ responseFactory(getAllMojomTypeDefinitions()[typeKey]); |
dynamic getAllTypeDefinitions([Function responseFactory]) => |
- getAllMojomTypeDefinitions(); |
+ responseFactory(getAllMojomTypeDefinitions()); |
} |
abstract class ImportedInterface { |
@@ -637,8 +637,13 @@ class ImportedInterfaceStub extends bindings.Stub { |
int get version => 0; |
- service_describer.ServiceDescription get serviceDescription => |
- new _ImportedInterfaceServiceDescription(); |
+ static service_describer.ServiceDescription _cachedServiceDescription; |
+ static service_describer.ServiceDescription get serviceDescription { |
+ if (_cachedServiceDescription == null) { |
+ _cachedServiceDescription = new _ImportedInterfaceServiceDescription(); |
+ } |
+ return _cachedServiceDescription; |
+ } |
} |