| Index: mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart
|
| diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart
|
| index 7e5992fa3da274cd5573f30c02e2ac6bbc56c07a..7742d7a3f24d1ec82b50dcfb099b67e583c2a7be 100644
|
| --- a/mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart
|
| +++ b/mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart
|
| @@ -480,13 +480,13 @@ mojom_types.MojomInterface _echoServiceEchoService() {
|
|
|
| class _EchoServiceServiceDescription implements service_describer.ServiceDescription {
|
| dynamic getTopLevelInterface([Function responseFactory]) =>
|
| - _echoServiceEchoService();
|
| + responseFactory(_echoServiceEchoService());
|
|
|
| dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions()[typeKey];
|
| + responseFactory(getAllMojomTypeDefinitions()[typeKey]);
|
|
|
| dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions();
|
| + responseFactory(getAllMojomTypeDefinitions());
|
| }
|
|
|
| abstract class EchoService {
|
| @@ -771,8 +771,13 @@ class EchoServiceStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _EchoServiceServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _EchoServiceServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
|
|
|
|