Index: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart |
index a95a7d8b5126bcb75e32e052920a0a2171c222f6..45afe9c72069f1319d9ba6ee7fab0d90e64c8c23 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart |
@@ -7651,13 +7651,13 @@ mojom_types.MojomInterface _testStructsSomeInterface() { |
class _SomeInterfaceServiceDescription implements service_describer.ServiceDescription { |
dynamic getTopLevelInterface([Function responseFactory]) => |
- _testStructsSomeInterface(); |
+ responseFactory(_testStructsSomeInterface()); |
dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
- getAllMojomTypeDefinitions()[typeKey]; |
+ responseFactory(getAllMojomTypeDefinitions()[typeKey]); |
dynamic getAllTypeDefinitions([Function responseFactory]) => |
- getAllMojomTypeDefinitions(); |
+ responseFactory(getAllMojomTypeDefinitions()); |
} |
abstract class SomeInterface { |
@@ -7870,8 +7870,13 @@ class SomeInterfaceStub extends bindings.Stub { |
int get version => 0; |
- service_describer.ServiceDescription get serviceDescription => |
- new _SomeInterfaceServiceDescription(); |
+ static service_describer.ServiceDescription _cachedServiceDescription; |
+ static service_describer.ServiceDescription get serviceDescription { |
+ if (_cachedServiceDescription == null) { |
+ _cachedServiceDescription = new _SomeInterfaceServiceDescription(); |
+ } |
+ return _cachedServiceDescription; |
+ } |
} |