| Index: mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart
|
| index c6c978cff9269a474018e3683f94d1c56cc6abef..868d987fa91ccf97ec30c51fd1125369c15e4e93 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart
|
| @@ -492,14 +492,19 @@ class CookieStoreProxy implements bindings.ProxyBase {
|
|
|
|
|
| class CookieStoreStub extends bindings.Stub {
|
| - CookieStore _impl = null;
|
| + CookieStore _impl;
|
|
|
| CookieStoreStub.fromEndpoint(
|
| - core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| - : super.fromEndpoint(endpoint);
|
| + core.MojoMessagePipeEndpoint endpoint, [CookieStore impl])
|
| + : super.fromEndpoint(endpoint, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| - CookieStoreStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| - : super.fromHandle(handle);
|
| + CookieStoreStub.fromHandle(
|
| + core.MojoHandle handle, [CookieStore impl])
|
| + : super.fromHandle(handle, autoBegin: impl != null) {
|
| + _impl = impl;
|
| + }
|
|
|
| CookieStoreStub.unbound() : super.unbound();
|
|
|
| @@ -527,7 +532,9 @@ class CookieStoreStub 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 _cookieStoreMethodGetName:
|
| var params = _CookieStoreGetParams.deserialize(
|
| @@ -582,10 +589,23 @@ class CookieStoreStub extends bindings.Stub {
|
|
|
| CookieStore get impl => _impl;
|
| set impl(CookieStore 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 "CookieStoreStub($superString)";
|
|
|