| Index: mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart
|
| diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart
|
| index eaee0d99975ab47cc0c09656b44d35f979790a64..8baadc38ea1c4c32486371ae3ba60dcdf23405db 100644
|
| --- a/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart
|
| +++ b/mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart
|
| @@ -2291,13 +2291,13 @@ mojom_types.MojomInterface _sampleServiceService() {
|
|
|
| class _ServiceServiceDescription implements service_describer.ServiceDescription {
|
| dynamic getTopLevelInterface([Function responseFactory]) =>
|
| - _sampleServiceService();
|
| + responseFactory(_sampleServiceService());
|
|
|
| dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions()[typeKey];
|
| + responseFactory(getAllMojomTypeDefinitions()[typeKey]);
|
|
|
| dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions();
|
| + responseFactory(getAllMojomTypeDefinitions());
|
| }
|
|
|
| abstract class Service {
|
| @@ -2528,8 +2528,13 @@ class ServiceStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _ServiceServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _ServiceServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
| const int _Port_postMessageName = 0;
|
| @@ -2551,13 +2556,13 @@ mojom_types.MojomInterface _sampleServicePort() {
|
|
|
| class _PortServiceDescription implements service_describer.ServiceDescription {
|
| dynamic getTopLevelInterface([Function responseFactory]) =>
|
| - _sampleServicePort();
|
| + responseFactory(_sampleServicePort());
|
|
|
| dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions()[typeKey];
|
| + responseFactory(getAllMojomTypeDefinitions()[typeKey]);
|
|
|
| dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions();
|
| + responseFactory(getAllMojomTypeDefinitions());
|
| }
|
|
|
| abstract class Port {
|
| @@ -2729,8 +2734,13 @@ class PortStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _PortServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _PortServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
|
|
|
|