| Index: mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart b/mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart
|
| index 38bd728ae18d98a3d8c3a6ea3a3f2ca3d5f4eb6c..3a4d244b7a8dee43d325536b75f0de6f3e9a86a2 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart
|
| @@ -653,14 +653,19 @@ class SensorListenerProxy implements bindings.ProxyBase {
|
|
|
|
|
| class SensorListenerStub extends bindings.Stub {
|
| - SensorListener _impl = null;
|
| + SensorListener _impl;
|
|
|
| SensorListenerStub.fromEndpoint(
|
| - core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| - : super.fromEndpoint(endpoint);
|
| + core.MojoMessagePipeEndpoint endpoint, [SensorListener impl])
|
| + : super.fromEndpoint(endpoint, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| - SensorListenerStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| - : super.fromHandle(handle);
|
| + SensorListenerStub.fromHandle(
|
| + core.MojoHandle handle, [SensorListener impl])
|
| + : super.fromHandle(handle, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| SensorListenerStub.unbound() : super.unbound();
|
|
|
| @@ -678,7 +683,9 @@ class SensorListenerStub extends bindings.Stub {
|
| 0,
|
| message);
|
| }
|
| - assert(_impl != null);
|
| + if (_impl == null) {
|
| + throw new core.MojoApiError("$this has no implementation set");
|
| + }
|
| switch (message.header.type) {
|
| case _sensorListenerMethodOnAccuracyChangedName:
|
| var params = _SensorListenerOnAccuracyChangedParams.deserialize(
|
| @@ -699,10 +706,23 @@ class SensorListenerStub extends bindings.Stub {
|
|
|
| SensorListener get impl => _impl;
|
| set impl(SensorListener d) {
|
| - assert(_impl == null);
|
| + if (d == null) {
|
| + throw new core.MojoApiError("$this: Cannot set a null implementation");
|
| + }
|
| + if (isBound && (_impl == null)) {
|
| + beginHandlingEvents();
|
| + }
|
| _impl = d;
|
| }
|
|
|
| + @override
|
| + void bind(core.MojoMessagePipeEndpoint endpoint) {
|
| + super.bind(endpoint);
|
| + if (!isOpen && (_impl != null)) {
|
| + beginHandlingEvents();
|
| + }
|
| + }
|
| +
|
| String toString() {
|
| var superString = super.toString();
|
| return "SensorListenerStub($superString)";
|
| @@ -849,14 +869,19 @@ class SensorServiceProxy implements bindings.ProxyBase {
|
|
|
|
|
| class SensorServiceStub extends bindings.Stub {
|
| - SensorService _impl = null;
|
| + SensorService _impl;
|
|
|
| SensorServiceStub.fromEndpoint(
|
| - core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| - : super.fromEndpoint(endpoint);
|
| + core.MojoMessagePipeEndpoint endpoint, [SensorService impl])
|
| + : super.fromEndpoint(endpoint, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| - SensorServiceStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| - : super.fromHandle(handle);
|
| + SensorServiceStub.fromHandle(
|
| + core.MojoHandle handle, [SensorService impl])
|
| + : super.fromHandle(handle, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| SensorServiceStub.unbound() : super.unbound();
|
|
|
| @@ -874,7 +899,9 @@ class SensorServiceStub extends bindings.Stub {
|
| 0,
|
| message);
|
| }
|
| - assert(_impl != null);
|
| + if (_impl == null) {
|
| + throw new core.MojoApiError("$this has no implementation set");
|
| + }
|
| switch (message.header.type) {
|
| case _sensorServiceMethodAddListenerName:
|
| var params = _SensorServiceAddListenerParams.deserialize(
|
| @@ -890,10 +917,23 @@ class SensorServiceStub extends bindings.Stub {
|
|
|
| SensorService get impl => _impl;
|
| set impl(SensorService d) {
|
| - assert(_impl == null);
|
| + if (d == null) {
|
| + throw new core.MojoApiError("$this: Cannot set a null implementation");
|
| + }
|
| + if (isBound && (_impl == null)) {
|
| + beginHandlingEvents();
|
| + }
|
| _impl = d;
|
| }
|
|
|
| + @override
|
| + void bind(core.MojoMessagePipeEndpoint endpoint) {
|
| + super.bind(endpoint);
|
| + if (!isOpen && (_impl != null)) {
|
| + beginHandlingEvents();
|
| + }
|
| + }
|
| +
|
| String toString() {
|
| var superString = super.toString();
|
| return "SensorServiceStub($superString)";
|
|
|