Index: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
index 88373ea34b686fcd1cea211430725b7dd261c741..40c39204f41b6d366971c476cc643d3d14002223 100644 |
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart |
@@ -3693,13 +3693,13 @@ mojom_types.MojomInterface _testUnionsSmallCache() { |
class _SmallCacheServiceDescription implements service_describer.ServiceDescription { |
dynamic getTopLevelInterface([Function responseFactory]) => |
- _testUnionsSmallCache(); |
+ responseFactory(_testUnionsSmallCache()); |
dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
- getAllMojomTypeDefinitions()[typeKey]; |
+ responseFactory(getAllMojomTypeDefinitions()[typeKey]); |
dynamic getAllTypeDefinitions([Function responseFactory]) => |
- getAllMojomTypeDefinitions(); |
+ responseFactory(getAllMojomTypeDefinitions()); |
} |
abstract class SmallCache { |
@@ -3926,8 +3926,13 @@ class SmallCacheStub extends bindings.Stub { |
int get version => 0; |
- service_describer.ServiceDescription get serviceDescription => |
- new _SmallCacheServiceDescription(); |
+ static service_describer.ServiceDescription _cachedServiceDescription; |
+ static service_describer.ServiceDescription get serviceDescription { |
+ if (_cachedServiceDescription == null) { |
+ _cachedServiceDescription = new _SmallCacheServiceDescription(); |
+ } |
+ return _cachedServiceDescription; |
+ } |
} |
const int _UnionInterface_echoName = 0; |
@@ -3950,13 +3955,13 @@ mojom_types.MojomInterface _testUnionsUnionInterface() { |
class _UnionInterfaceServiceDescription implements service_describer.ServiceDescription { |
dynamic getTopLevelInterface([Function responseFactory]) => |
- _testUnionsUnionInterface(); |
+ responseFactory(_testUnionsUnionInterface()); |
dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
- getAllMojomTypeDefinitions()[typeKey]; |
+ responseFactory(getAllMojomTypeDefinitions()[typeKey]); |
dynamic getAllTypeDefinitions([Function responseFactory]) => |
- getAllMojomTypeDefinitions(); |
+ responseFactory(getAllMojomTypeDefinitions()); |
} |
abstract class UnionInterface { |
@@ -4169,8 +4174,13 @@ class UnionInterfaceStub extends bindings.Stub { |
int get version => 0; |
- service_describer.ServiceDescription get serviceDescription => |
- new _UnionInterfaceServiceDescription(); |
+ static service_describer.ServiceDescription _cachedServiceDescription; |
+ static service_describer.ServiceDescription get serviceDescription { |
+ if (_cachedServiceDescription == null) { |
+ _cachedServiceDescription = new _UnionInterfaceServiceDescription(); |
+ } |
+ return _cachedServiceDescription; |
+ } |
} |