| Index: services/dart/test/pingpong/main.dart
|
| diff --git a/services/dart/test/pingpong/main.dart b/services/dart/test/pingpong/main.dart
|
| index 9b04761c0ffc61254926e4ad3d9ff53440643838..9f7485d74bca8b3ab7f03b2414ffdba5c9ef212d 100644
|
| --- a/services/dart/test/pingpong/main.dart
|
| +++ b/services/dart/test/pingpong/main.dart
|
| @@ -16,7 +16,7 @@ class PingPongClientImpl implements PingPongClient {
|
|
|
| PingPongClientImpl.unbound(this._count, this._completer)
|
| : stub = new PingPongClientStub.unbound() {
|
| - stub.delegate = this;
|
| + stub.impl = this;
|
| }
|
|
|
| void pong(int pongValue) {
|
| @@ -34,19 +34,17 @@ class PingPongServiceImpl implements PingPongService {
|
|
|
| PingPongServiceImpl(Application application, MojoMessagePipeEndpoint endpoint)
|
| : _application = application {
|
| - _stub = new PingPongServiceStub.fromEndpoint(endpoint)
|
| - ..delegate = this
|
| - ..listen();
|
| + _stub = new PingPongServiceStub.fromEndpoint(endpoint, impl: this);
|
| }
|
|
|
| PingPongServiceImpl.fromStub(this._stub) {
|
| - _stub.delegate = this;
|
| + _stub.impl = this;
|
| }
|
|
|
| listen() => _stub.listen();
|
|
|
| void setClient(ProxyBase proxyBase) {
|
| - assert(_pingPongClient== null);
|
| + assert(_pingPongClient == null);
|
| _pingPongClient = proxyBase;
|
| }
|
|
|
| @@ -61,7 +59,7 @@ class PingPongServiceImpl implements PingPongService {
|
| return responseFactory(false);
|
| }
|
| var completer = new Completer();
|
| - var pingPongService= new PingPongServiceProxy.unbound();
|
| + var pingPongService = new PingPongServiceProxy.unbound();
|
| _application.connectToService(url, pingPongService);
|
|
|
| var pingPongClient = new PingPongClientImpl.unbound(count, completer);
|
| @@ -73,13 +71,13 @@ class PingPongServiceImpl implements PingPongService {
|
| }
|
| await completer.future;
|
| pingPongService.ptr.quit();
|
| + pingPongService.close();
|
|
|
| return responseFactory(true);
|
| }
|
|
|
| - Future pingTargetService(ProxyBase proxyBase,
|
| - int count,
|
| - Function responseFactory) async {
|
| + Future pingTargetService(ProxyBase proxyBase, int count,
|
| + Function responseFactory) async {
|
| var pingPongService = proxyBase;
|
| var completer = new Completer();
|
| var client = new PingPongClientImpl.unbound(count, completer);
|
| @@ -91,6 +89,7 @@ class PingPongServiceImpl implements PingPongService {
|
| }
|
| await completer.future;
|
| pingPongService.ptr.quit();
|
| + pingPongService.close();
|
|
|
| return responseFactory(true);
|
| }
|
| @@ -105,9 +104,7 @@ class PingPongServiceImpl implements PingPongService {
|
| _pingPongClient = null;
|
| }
|
| _stub.close();
|
| - if (_application != null) {
|
| - _application.close();
|
| - }
|
| + _stub = null;
|
| }
|
| }
|
|
|
| @@ -116,8 +113,9 @@ class PingPongApplication extends Application {
|
|
|
| @override
|
| void acceptConnection(String requestorUrl, String resolvedUrl,
|
| - ApplicationConnection connection) {
|
| - connection.provideService(PingPongServiceName,
|
| + ApplicationConnection connection) {
|
| + connection.provideService(
|
| + PingPongServiceName,
|
| (endpoint) => new PingPongServiceImpl(this, endpoint));
|
| connection.listen();
|
| }
|
|
|