Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: services/dart/test/pingpong_target/main.dart

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/test/pingpong_target/main.dart
diff --git a/services/dart/test/pingpong_target/main.dart b/services/dart/test/pingpong_target/main.dart
index 2e738d0b463fdb838997917a04ec5217bdd60399..36f8a26a65b111ec1fc70b4251236def942c89a9 100644
--- a/services/dart/test/pingpong_target/main.dart
+++ b/services/dart/test/pingpong_target/main.dart
@@ -52,7 +52,12 @@ class PingPongApplication extends Application {
connection.provideService(PingPongServiceName,
(endpoint) => new PingPongServiceImpl(this, endpoint));
// Close the application when the first connection goes down.
- connection.onError = close;
+ connection.onError = closeApplication;
+ }
+
+ Future closeApplication() async {
+ await close();
+ assert(MojoHandle.reportLeakedHandles());
}
}
« no previous file with comments | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698