| Index: mojo/dart/packages/mojo_services/lib/mojo/media/media_demux.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_demux.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_demux.mojom.dart
|
| index 876bd7cc475f6b9e77cfddd73b5ce6eb01374787..bf79e39e730f7a3d3d98885d508af8fe95df6f16 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/media/media_demux.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_demux.mojom.dart
|
| @@ -1046,14 +1046,19 @@ class MediaDemuxProxy implements bindings.ProxyBase {
|
|
|
|
|
| class MediaDemuxStub extends bindings.Stub {
|
| - MediaDemux _impl = null;
|
| + MediaDemux _impl;
|
|
|
| MediaDemuxStub.fromEndpoint(
|
| - core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| - : super.fromEndpoint(endpoint);
|
| + core.MojoMessagePipeEndpoint endpoint, [MediaDemux impl])
|
| + : super.fromEndpoint(endpoint, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| - MediaDemuxStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| - : super.fromHandle(handle);
|
| + MediaDemuxStub.fromHandle(
|
| + core.MojoHandle handle, [MediaDemux impl])
|
| + : super.fromHandle(handle, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| MediaDemuxStub.unbound() : super.unbound();
|
|
|
| @@ -1094,7 +1099,9 @@ class MediaDemuxStub 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 _mediaDemuxMethodDescribeName:
|
| var response = _impl.describe(_mediaDemuxDescribeResponseParamsFactory);
|
| @@ -1214,10 +1221,23 @@ class MediaDemuxStub extends bindings.Stub {
|
|
|
| MediaDemux get impl => _impl;
|
| set impl(MediaDemux 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 "MediaDemuxStub($superString)";
|
|
|