| Index: mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart
|
| index 41a3dab5a7f977c6990f038e09cb0141414722bd..bc5d67c259a87d54876f9794937bdfbc4f6fa7f4 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart
|
| @@ -395,14 +395,19 @@ class RendererProxy implements bindings.ProxyBase {
|
|
|
|
|
| class RendererStub extends bindings.Stub {
|
| - Renderer _impl = null;
|
| + Renderer _impl;
|
|
|
| RendererStub.fromEndpoint(
|
| - core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| - : super.fromEndpoint(endpoint);
|
| + core.MojoMessagePipeEndpoint endpoint, [Renderer impl])
|
| + : super.fromEndpoint(endpoint, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| - RendererStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| - : super.fromHandle(handle);
|
| + RendererStub.fromHandle(
|
| + core.MojoHandle handle, [Renderer impl])
|
| + : super.fromHandle(handle, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| RendererStub.unbound() : super.unbound();
|
|
|
| @@ -420,7 +425,9 @@ class RendererStub 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 _rendererMethodSetRootSceneName:
|
| var params = _RendererSetRootSceneParams.deserialize(
|
| @@ -444,10 +451,23 @@ class RendererStub extends bindings.Stub {
|
|
|
| Renderer get impl => _impl;
|
| set impl(Renderer 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 "RendererStub($superString)";
|
|
|