| Index: mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart
|
| index 542703a7d80816e2d9b02c3372412673ca60345e..c555ee614d8ca17d8d718476f2262e777ab770df 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart
|
| @@ -120,11 +120,14 @@ const int _ServiceRegistry_addServicesName = 0;
|
|
|
|
|
| class _ServiceRegistryServiceDescription implements service_describer.ServiceDescription {
|
| - dynamic getTopLevelInterface([Function responseFactory]) => null;
|
| + dynamic getTopLevelInterface([Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
|
| + dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getAllTypeDefinitions([Function responseFactory]) => null;
|
| + dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| + responseFactory(null);
|
| }
|
|
|
| abstract class ServiceRegistry {
|
| @@ -296,8 +299,13 @@ class ServiceRegistryStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _ServiceRegistryServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _ServiceRegistryServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
|
|
|
|