| Index: services/dart/test/pingpong/main.dart
|
| diff --git a/services/dart/test/pingpong/main.dart b/services/dart/test/pingpong/main.dart
|
| index 01dd1cb95cce6bd5b101c3a4da5d7c214bbc850f..a395b72af73dfadf6c9edc41ad039cbec384c26b 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,13 +34,12 @@ 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();
|
| @@ -61,7 +60,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,6 +72,7 @@ class PingPongServiceImpl implements PingPongService {
|
| }
|
| await completer.future;
|
| pingPongService.ptr.quit();
|
| + pingPongService.close();
|
|
|
| return responseFactory(true);
|
| }
|
| @@ -91,6 +91,7 @@ class PingPongServiceImpl implements PingPongService {
|
| }
|
| await completer.future;
|
| pingPongService.ptr.quit();
|
| + pingPongService.close();
|
|
|
| return responseFactory(true);
|
| }
|
| @@ -105,16 +106,16 @@ class PingPongServiceImpl implements PingPongService {
|
| _pingPongClient = null;
|
| }
|
| _stub.close();
|
| - if (_application != null) {
|
| - _application.close();
|
| - }
|
| + _stub = null;
|
| }
|
| }
|
|
|
| class PingPongApplication extends Application {
|
| PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
|
|
|
| - void acceptConnection(String requestorUrl, ApplicationConnection connection) {
|
| + void acceptConnection(String requestorUrl,
|
| + ApplicationConnection connection,
|
| + String resolvedUrl) {
|
| connection.provideService(PingPongServiceName,
|
| (endpoint) => new PingPongServiceImpl(this, endpoint));
|
| connection.listen();
|
|
|