| Index: mojo/public/python/mojo_bindings/reflection.py
|
| diff --git a/mojo/public/python/mojo_bindings/reflection.py b/mojo/public/python/mojo_bindings/reflection.py
|
| index 5432691c3e783147eeb67d699b6a54ff413d7320..e7d25dd69a537554b7d686bb94094148faf44a88 100644
|
| --- a/mojo/public/python/mojo_bindings/reflection.py
|
| +++ b/mojo/public/python/mojo_bindings/reflection.py
|
| @@ -282,7 +282,7 @@ class InterfaceManager(object):
|
|
|
| # Give an instance manager to the implementation to allow it to close
|
| # the connection.
|
| - impl.manager = InstanceManager(router)
|
| + impl.manager = InstanceManager(router, error_handler)
|
|
|
| router.Start()
|
|
|
| @@ -304,7 +304,7 @@ class InterfaceManager(object):
|
|
|
| proxy = self._proxy_class(router, error_handler)
|
| # Give an instance manager to the proxy to allow to close the connection.
|
| - proxy.manager = InstanceManager(router)
|
| + proxy.manager = InstanceManager(router, error_handler)
|
| return proxy
|
|
|
| def _Stub(self, impl):
|
| @@ -327,14 +327,18 @@ class InstanceManager(object):
|
| Manager for the implementation of an interface or a proxy. The manager allows
|
| to control the connection over the pipe.
|
| """
|
| - def __init__(self, router):
|
| - self.router = router
|
| + def __init__(self, router, error_handler):
|
| + self._router = router
|
| + self._error_handler = error_handler
|
|
|
| def Close(self):
|
| - self.router.Close()
|
| + self._router.Close()
|
|
|
| def PassMessagePipe(self):
|
| - return self.router.PassMessagePipe()
|
| + return self._router.PassMessagePipe()
|
| +
|
| + def AddOnErrorCallback(self, callback):
|
| + self._error_handler.AddCallback(lambda _: callback())
|
|
|
|
|
| class _MethodDescriptor(object):
|
|
|