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

Unified Diff: examples/dart/hello_world/world/main.dart

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix regexes 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
Index: examples/dart/hello_world/world/main.dart
diff --git a/examples/dart/hello_world/world/main.dart b/examples/dart/hello_world/world/main.dart
index b1343feee44ab6f1c59db0b919b29a7527dc6d8d..a9c2b92c5a78b0a8b388b56c60392449d2b573e2 100644
--- a/examples/dart/hello_world/world/main.dart
+++ b/examples/dart/hello_world/world/main.dart
@@ -4,6 +4,7 @@
// This app is run by examples/dart/hello_world/hello.
+import 'dart:async';
import 'mojo:application';
import 'mojo:bindings';
import 'mojo:core';
@@ -13,7 +14,12 @@ class World extends Application {
void initialize(List<String> args, String url) {
print("$url World");
- close();
+ closeApplication();
+ }
+
+ Future closeApplication() async {
+ await close();
+ assert(MojoHandle.reportLeakedHandles());
}
}

Powered by Google App Engine
This is Rietveld 408576698